How to Unescape a JSON String: Decode Quotes, Newlines & Unicode
Learn how to JSON unescape a string online - decode escaped quotes, \n, \t, \uXXXX, and double-escaped JSON safely in the browser.
Escaped JSON strings are hard to read: \", \\n, \\t, and \\uXXXX hide the text you actually care about. To unescape JSON means decoding those escape sequences back into readable text. This guide shows how to unescape a JSON string online, in JavaScript, and in Python, including the tricky case of double-escaped JSON.
The quickest way: JSON unescape online
Paste the escaped string into the JSON Unescape tool. It decodes standard JSON escape sequences, strips surrounding quotes when needed, can run a second pass for double-escaped input, and pretty-prints the result if the decoded text is itself JSON.
Use a client-side JSON unescape tool when the string came from logs, API payloads, or production data. Ours runs in your browser, so the text is not uploaded.
Use it when: you want to read or debug an escaped JSON string quickly.
What JSON unescape decodes
JSON strings use escape sequences for characters that cannot appear directly:
\"becomes"\\becomes\\nbecomes a newline\tbecomes a tab\rbecomes a carriage return\u0041becomesA
For example:
"Line one\nLine two"
decodes to:
Line one
Line two
Input with quotes vs content only
Sometimes the escaped string is a complete JSON string:
"She said \"hello\""
Sometimes it is only the escaped content:
She said \"hello\"
A good unescaper handles both. In code, the complete JSON string is easier because JSON.parse can decode it directly.
Double-escaped JSON
Double escaping happens when a string is encoded more than once:
"{\"name\":\"Ada\"}"
The first decode produces:
{"name":"Ada"}
If that decoded text is JSON, you can parse or pretty-print it. This is common in logs, database fields, webhook bodies, and JSON nested inside another JSON document.
JSON unescape in JavaScript
If you have a complete JSON string value, use JSON.parse:
const escaped = '"She said \\"hello\\"\\nNext line"';
const text = JSON.parse(escaped);
console.log(text);
If you only have escaped content, wrap it before parsing:
const content = 'She said \\"hello\\"';
const text = JSON.parse(`"${content}"`);
Be careful with untrusted input. JSON.parse is safe for JSON, but you should not use eval to decode strings.
JSON unescape in Python
Python’s json.loads decodes a complete JSON string:
import json
escaped = '"She said \\"hello\\"\\nNext line"'
text = json.loads(escaped)
print(text)
For content-only strings, wrap them as a JSON string first or use a proper JSON decoder in the context where the value appears.
Common mistakes
The most common mistake is using a generic “HTML decode” or URL decode function. JSON escaping is different. %20 belongs to URLs, " belongs to HTML, and \" belongs to JSON.
Another mistake is decoding too many times. If one pass gives you readable text, stop. A second pass may turn meaningful backslash sequences into actual control characters.
Which method should you use?
For quick debugging, use the online JSON Unescape tool: paste the escaped string, decode it, and pretty-print if the result is JSON. Use JSON.parse in JavaScript and json.loads in Python when you have a complete JSON string value. Avoid eval, and watch for double-escaped data from logs or nested payloads.
Need the reverse? Read how to escape JSON strings, or use JSON Repair if the decoded output is close to JSON but not valid yet.
Ready to merge your JSON?
Combine files or snippets in your browser — free and private.
Open the merge toolKeep reading