JSON Unescape Online

Paste an escaped JSON string and get the original text back. Backslash sequences and \uXXXX escapes are both decoded, and the result is pretty-printed if it turns out to be JSON.

Input
Output

Paste something on the left. It is processed on this page and never uploaded.

What gets decoded

The six two-character escapes JSON defines, \" \\ \/ \b \f \n \r \t, and the six-character \uXXXX form for any other code point. Surrogate pairs are joined back into the single character they represent, so an emoji escaped as two \u sequences comes back as one emoji.

If the decoded result is itself valid JSON, it is pretty-printed. That is the usual case: what you have is a JSON document that was stored inside a string field, and what you want is to read it.

Double escaping

Text that has been escaped twice needs decoding twice. You can tell because after one pass the result still contains backslash sequences rather than the characters they stand for. Run the output back through and it comes out clean.

Double escaping usually means something in your pipeline is calling a serialiser on a value that was already serialised. Finding that is a better fix than decoding twice forever.

Questions

My output still has backslashes in it. What now?

The text was escaped more than once. Paste the output back in and unescape again. If that fixes it, something upstream is serialising an already-serialised value.

Other tools