Turn text into a valid JSON string literal
JSON Unescape
Read the message hidden inside an escaped log line or API field as normal text.
Loading tool…
How to use json unescape
Paste the string, with or without its surrounding quotes.
Leave 'Undo double escaping' on for strings that were escaped twice.
Fix any reported bad escape at the given line and column.
Copy or download the plain text.
What this tool does
- Accepts the string with or without its quotes.
- Peels off several layers of escaping, common in logs that store JSON inside JSON.
- Points at the exact invalid escape, lone backslash, raw line break or unescaped quote.
- Restores emoji from surrogate pair escapes.
How the result is verified
The decoded text is escaped again and parsed back, and must give the same characters.
Frequently asked questions
My log line has \\n instead of \n. Why?
The text was escaped twice, usually because JSON was stored inside another JSON string. Keep 'Undo double escaping' on and the tool removes each layer and tells you how many.
Does it run the text as code?
No. It only decodes escape sequences with the browser's JSON reader; nothing is executed.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Beautify or minify JSON with your choice of indentation
Find JSON syntax errors with the exact line and column
Collapsible, searchable tree view that stays fast on large files