---
title: "JSONDECODE"
description: "The JSONDECODE SQL function returns the JSON encoded text as regular text, with the JSON representation of special characters replaced by their original\u2026"
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/jsondecode
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/jsondecode
updated: 2026-08-09T00:00:00Z
license: https://documentation.invantive.eu/en/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> JSONDECODE[JSONDECODE]:::quoted
    JSONDECODE --> End((END))
```

## Purpose
The `JSONDECODE` SQL function returns the JSON encoded text as regular text, with the JSON representation of special characters replaced by their original meaning.

See also [[JSONELEMENT]] and [[JSONENCODE]].

Parameters:
- Input (`varchar2`): the input which will be decoded from JSON to text.

Returns: a text which is the input decoded from JSON as `varchar2`.

## Examples
The following example retrieves the text representation of a JSON representation:
```sql
select jsondecode('"Special characters such as backslash (\\) and quote (\")."')

----------------
Special characters such as backslash (\) and quote (").
```
The following example retrieves the text representation of a JSON representation of a number:
```sql
select jsondecode('5.2')

----------------
5.2
```
The following example raises an error since the text is not a JSON representation:
```sql
select jsondecode('Invalid JSON')

itgenclr078: Error parsing Infinity value. Path '', line 1, position 2.
```