JSON unescape

Unescape a JSON string in your browser: nothing is uploaded, there is no limit on the length, and line breaks, quotes, tabs and \u codes are turned back into the characters they stand for.

How it works

  1. Paste your code

    Paste the code in the left box or open a file. No code to hand? Click Example.

  2. Instant result

    The result appears as you type. If there is an error, you see the line and character.

  3. Copy or download

    Copy the result with one click or save it as a file for your editor or project.

What does it convert?

Every escape that JSON knows: \", \\, \/, \b, \f, \n, \r, \t and \uXXXX, including emoji written as two \u codes. The conversion follows the JSON standard exactly, so \\n correctly becomes a backslash followed by an n, not a line break.

Error messages

A quote that isn't escaped, or an escape JSON doesn't know (such as \' or \x41), gives a message with the exact position. That helps when a log file or API response contains a string that won't parse.

To escape text, use JSON escape.

Logs and API responses full of backslashes

A message in a log file, an error from an API or a field that contains another JSON document often shows \" and \n all over the place. Paste the string here, with or without the outer quotes, to read it as it was meant. If the result is itself JSON, paste it into the JSON formatter to make it readable.

Escaped twice?

If the output still contains \n or \", the string was escaped twice, which happens when JSON is stored inside a JSON field and then logged again. Run the unescape a second time. Each run removes one level.

Emoji and accents

Characters outside the basic range are written as \u codes, and emoji as two of them (a surrogate pair), such as \ud83d\ude00. The tool combines them correctly, so you get the emoji back and not two broken characters.

To go the other way and prepare text for a JSON string, use JSON escape.

Frequently asked questions

Why does the tool reject my string?

It contains an escape that JSON does not know, such as \' or \x41, or a quote that is not escaped. The message shows the position.

Do I include the outer quotes?

It works with or without them.

Why do I still see backslashes in the result?

The text was escaped more than once. Unescape it again.

Is my text uploaded?

No. It is converted in your browser and never sent anywhere.