JSON String Unescape
JSON String Unescape wraps the entered text in double quotes and parses it as JSON after a replacement sequence that does not reliably protect raw quote characters. Valid JSON escapes such as \n, \t, \\, and Unicode escapes can decode, while unescaped double quotes generally make the constructed JSON invalid. It is not a general JavaScript, HTML, URL, or shell unescaper and must not be confused with sanitization.
Runs locally — files stay on your deviceShould input include surrounding quotes?
No. The tool constructs them internally.
Unescaping interprets control syntax
A backslash changes the meaning of the character after it according to JSON string grammar; malformed or unknown sequences fail parsing.
How it works
The input is embedded between quotes and passed to JSON.parse; parser errors are returned by the runner.
Key concepts
Interior expected
Surrounding source quotes cause ambiguity/error.
Parser enforces grammar
Unknown escapes such as \q fail.
When to use it
- Decode a known JSON string interior.
- Turn \n into an actual line break.
- Inspect escaped Unicode and backslashes.
When not to use it
- Do not paste a full quoted JSON string.
- Do not expect raw embedded quotes to be repaired.
- Do not use decoded output as trusted executable content.
Worked examples
Newline
- Input
a\nb- Expected output
Two lines
\n is interpreted.
Unicode
- Input
\u0041- Expected output
A
JSON Unicode escape decodes.
Raw quote
- Input
a"b- Expected output
Likely error
The constructed literal is broken.
Common mistakes
Including outer quotes
The page adds another pair. Correction: Paste only the interior.
Expecting arbitrary backslashes
Only JSON escapes are legal. Correction: Verify the source format.
Executing decoded text
Decoding creates no trust. Correction: Validate for the final context.
Best practices
- Know the exact source encoding layer.
- Use JSON.parse on complete JSON when possible.
- Avoid repeated unescape cycles.
Related operations and differences
JSON String Escape
Choose JSON String Escape when you need to escape text for a JSON string value.; use JSON String Unescape specifically for json unescape.
CSV to JSON
Choose CSV to JSON when you need to convert a header-based CSV table to JSON.; use JSON String Unescape specifically for json unescape.
Extract JSON Values
Choose Extract JSON Values when you need to list every primitive value in a JSON document.; use JSON String Unescape specifically for json unescape.
JSON Beautifier
Choose JSON Beautifier when you need to format JSON with readable indentation.; use JSON String Unescape specifically for json unescape.
JSON Flattener
Choose JSON Flattener when you need to flatten nested objects into dot paths.; use JSON String Unescape specifically for json unescape.
JSON Key Sorter
Choose JSON Key Sorter when you need to sort object keys recursively.; use JSON String Unescape specifically for json unescape.
Limitations and privacy
- JSON string-interior interpretation only.
- Raw quotes are not robustly handled; no full-literal mode, recursive decode, repair, context detection, or sanitization.
Input is processed locally in this browser and is not uploaded by the tool.
Frequently asked questions
Does \n become a newline?
Yes.
Should I include quotes?
No.
Are invalid escapes guessed?
No.
Does this make content safe?
No.