Overview
Introduction
When JSON arrives embedded inside another string, a log line, a webhook payload, a config value, its quotes and newlines are backslash-escaped so they don't break the outer string. Reading it in that state is painful.
This tool reverses that escaping in one step, turning the fragment back into normal, readable text.
What Is JSON Unescaper?
An unescaper that decodes backslash sequences (\", \\, \n, \t, and others) in a quote-free JSON fragment back into their literal characters.
It's the mirror image of Escape JSON: what one tool escapes, the other restores.
How JSON Unescaper Works
The tool wraps your input in a pair of double quotes internally, forming a complete JSON string literal, then hands it to JSON.parse(), which resolves every escape sequence per the JSON string grammar.
Because it delegates to the native parser rather than a hand-rolled regex, the decoding is exactly as correct as any JSON implementation's.
When To Use JSON Unescaper
Use it when you've copied an escaped JSON fragment out of a log file, webhook payload, or config value and need to read or re-use the original text.
It's also useful when debugging why a string field 'looks wrong', pasting it here quickly reveals whether it's just escaping, or genuinely malformed data.
Often used alongside JSON Escaper, JSON Unstringifier and JSON Formatter & Beautifier.
Features
Advantages
- Uses the native JSON parser, so decoding matches the spec exactly.
- Reports a precise error location for malformed escape sequences.
- Runs entirely client-side.
Limitations
- Expects a quote-free fragment as input; a fully quoted string literal will fail unless you strip the outer quotes first.
- Doesn't validate that the decoded result is itself valid JSON.
Examples
Best Practices & Notes
Best Practices
- If you're not sure whether your input includes outer quotes, try Unstringify JSON first.
- Validate the decoded output separately if you expect it to be JSON.
- Keep a copy of the original escaped text until you've confirmed the decode is correct.
Developer Notes
The implementation is JSON.parse('"' + input + '"'): wrapping the fragment in quotes turns it into a valid JSON string literal, which the native parser then decodes using its own escape-sequence rules, no custom unescaping logic required.
JSON Unescaper Use Cases
- Reading an escaped JSON payload copied from a log line
- Debugging a webhook body that embeds JSON as a string field
- Recovering original text from an escaped config value
Common Mistakes
- Including the outer quotes in the input, which the tool then treats as literal characters, not delimiters.
- Assuming the decoded output is automatically valid JSON without checking.
- Unescaping text that was never escaped, which either passes through unchanged or errors on stray backslashes.
Tips
- If decoding fails, check for an odd number of backslashes, a common sign of double-escaping.
- Pair with the JSON Formatter to pretty-print the result once it's decoded.