What JSON Unescape does
JSON Unescape decodes the escape sequences of a JSON string value back into the characters they stand for. It follows JSON exactly: only the eight escapes JSON defines are accepted.
Anything else, such as \x41 or a single backslash in a Windows path, is an error in JSON, so the tool stops and reports the line and column instead of guessing.
JSON Unescape examples
The built-in sample
Input
say \"hello\" & <b>bye</b>Output
say "hello" & <b>bye</b>This is the input that the Load sample button fills in.
Common escapes
Input
Name:\t\"Zo\u00eb\"\nDone \ud83d\ude00Output
Name: "Zoë"
Done 😀\t, \n, the quotes and the \u escapes are decoded. An emoji is written in JSON as a pair of \u escapes (a surrogate pair), which decodes to one character.
An escape JSON does not have
Input
C:\temp\x41Result
\x is not a JSON escape. JSON allows \" \\ \/ \b \f \n \r \t and \uXXXX (line 1, column 8)
The tool reports the first invalid escape and where it is. In JSON a backslash must itself be escaped: C:\\temp.
Each output was produced by running this tool on the input above it.
How it works
Each backslash sequence is replaced as shown below. Text without a backslash is copied unchanged.
| Escaped form | Character |
|---|---|
\" | " |
\\ | \ |
\/ | / |
\n | line break |
\r | carriage return |
\t | tab |
\b \f | backspace, form feed |
\uXXXX | the UTF-16 code unit XXXX |
Details and limits
- Paste the contents of the string without the surrounding quotes. If you have a whole JSON document, use the JSON Formatter, which decodes every string as it parses.
- Raw line breaks in the input are kept, even though a JSON string written in a file may not contain them.
Questions
Is my data uploaded when I use JSON Unescape?
No. The tool runs in your browser, so what you paste or open is processed on your own device and is not sent to a server.
What does JSON Unescape do?
JSON Unescape decodes the escape sequences of a JSON string value back into the characters they stand for. It follows JSON exactly: only the eight escapes JSON defines are accepted.
Are there any limits I should know about?
Paste the contents of the string without the surrounding quotes. If you have a whole JSON document, use the JSON Formatter, which decodes every string as it parses. Raw line breaks in the input are kept, even though a JSON string written in a file may not contain them.
Is there a size limit?
There is no fixed size limit. Everything happens on your device, so very large inputs depend on its memory and can take longer on a phone than on a computer.
Does it work on phones, and is it free?
Yes. It works in any current browser on Android phones, iPhones, tablets and computers. It is free and needs no account or sign-up.