Turn a quoted JSON string back into plain text
JSON Unescape decodes one quoted JSON string literal into its plain text value. It is useful when logs or APIs show backslash escapes instead of visible characters.
When should you use it?
- Read a string containing escaped newlines.
- Inspect escaped quotes or Unicode sequences.
- Recover raw text from a JSON string field.
Example: turn an escape into a line break
The two-character backslash-n sequence becomes a real newline in the output text.
"Hello\nworld"Hello
worldRead escapes as source syntax
In a JSON string, \n represents a newline and \" represents a quote. Decoding replaces those source escapes with their corresponding characters. The input needs its enclosing double quotes because they identify one complete JSON string value. A string copied from a programming-language literal may have an additional escaping layer, so identify what was actually copied.
Choose plain text or a nested JSON document
Unescape can return a message, a path, or any other text; it does not require the decoded text to be JSON. If the outer string contains an encoded JSON document and you want that inner document validated too, use Unstringify. Do not remove backslashes manually: a backslash can encode a quote, a control character, Unicode, or another literal backslash.
How do I turn a quoted JSON string with \n into real text?
Paste one valid JSON string literal, including the outer double quotes. Unescape interprets sequences such as \n, \t, and escaped quotes and returns plain text. It is helpful when log output shows literal backslashes instead of readable line breaks.
Quoted input and plain-text output
textInput: "first\nsecond"
Output: first
secondThe output contains an actual line break. If you need a valid JSON string again, run JSON Escape on the plain text.
Can I unescape a complete JSON object here?
No. The input must be exactly one quoted JSON string. Use JSON Unstringify when that string contains another complete JSON document.
What should you check before using the result?
The result is no longer a JSON string literal. To place it back into JSON safely, use JSON Escape; to decode a string containing a whole JSON document, use JSON Unstringify.
Understand JSON syntaxTechnical reference: JSON syntax and interoperability · RFC 8259