> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/sql-functions/special-functions/json-functions/json_unquote.md).

# JSON\_UNQUOTE

## Syntax

```bnf
JSON_UNQUOTE(val)
```

## Description

Unquotes a JSON value, returning a string, or `NULL` if the argument is null.

An error will occur if the given value begins and ends with double quotes and is an invalid JSON string literal.

If the given value is not a JSON string, value is passed through unmodified.

Certain character sequences have special meanings within a string. Usually, a backslash is ignored, but the escape sequences in the table below are recognised by MariaDB, unless the [SQL Mode](/docs/server/server-management/variables-and-modes/sql_mode.md) is set to `NO_BACKSLASH_ESCAPES` .

| Escape sequence | Character                          |
| --------------- | ---------------------------------- |
| "               | Double quote (")                   |
| \b              | Backslash                          |
| \f              | Formfeed                           |
| \n              | Newline (linefeed)                 |
| \r              | Carriage return                    |
| \t              | Tab                                |
| \\              | Backslash ()                       |
| \uXXXX          | UTF-8 bytes for Unicode value XXXX |

## Examples

```sql
SELECT JSON_UNQUOTE('"Monty"');
+-------------------------+
| JSON_UNQUOTE('"Monty"') |
+-------------------------+
| Monty                   |
+-------------------------+
```

With the default [SQL Mode](/docs/server/server-management/variables-and-modes/sql_mode.md):

```sql
SELECT JSON_UNQUOTE('Si\bng\ting');
+-----------------------------+
| JSON_UNQUOTE('Si\bng\ting') |
+-----------------------------+
| Sng	ing                   |
+-----------------------------+
```

Setting `NO_BACKSLASH_ESCAPES`:

```sql
SET @@sql_mode = 'NO_BACKSLASH_ESCAPES';

SELECT JSON_UNQUOTE('Si\bng\ting');
+-----------------------------+
| JSON_UNQUOTE('Si\bng\ting') |
+-----------------------------+
| Si\bng\ting                 |
+-----------------------------+
```

## See Also

* [JSON Arrow Operators](/docs/server/reference/sql-functions/special-functions/json-functions/json-arrow-operators.md) — the `->>` operator is shorthand for `JSON_UNQUOTE(JSON_EXTRACT())`.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
