Unescape a JSON String
Unescaping recovers the real text from a JSON-escaped string. Wrap the escaped value in quotes and pretty-print it in the tool below, then read off the decoded content using the rules here.
The escape sequences to reverse
Inside a JSON string, certain characters are written as escapes. Unescaping reverses them: \n becomes a real newline, \t a tab, \" a double quote, \\ a single backslash, and \/ a forward slash.
Unicode escapes
\u00e9 is a Unicode code point — here é. Convert each \uXXXX to its character. Characters outside the basic range appear as a surrogate pair of two \u escapes that must be combined.
The quick trick
If your escaped text is the value of a JSON key, just parse the whole object: the parser unescapes the string for you. Copy the parsed value and you have the original text, newlines and all.
FAQ
What is the easiest way to unescape?
Put the escaped string as a value in a small JSON object and parse it — the JSON parser performs all unescaping, then read the resulting value.
Why do I see \\n instead of a newline?
That is an escaped backslash followed by n, meaning the text was escaped twice. Unescape once to get \n, then again to get a real newline.
How do I handle \uXXXX sequences?
Each is a Unicode code point; convert it to the character it names. Parsing the string as JSON does this automatically.