Before · escaped once
{\"event\":\"order.updated\",\"note\":\"Packed\"}Unescape JSON strings back into readable, formatted JSON for debugging payloads and logs.
Choose 2× only when the input was escaped through two string layers.
A field guide to escaped JSON
Paste a JSON string full of \", \\, \n, or \uXXXX sequences and turn it back into readable text. This free online JSON unescape tool handles one or two layers, so an API field, copied log line, or nested payload is easier to inspect before you format or share it.
Before and after: reading an order event
Picture an on-call engineer reviewing an order update from a test environment. The log viewer has stored the request body as a string, so each quote appears with a backslash and the whole payload has been squeezed onto one line. The data may be intact; it is simply shown at the wrong layer for a quick review. One unescape pass removes the outer string encoding. If a queue or second log wrapper serialized it again, a second pass reveals the inner document. The sample below shows both paths with the same small payload.
{\"event\":\"order.updated\",\"note\":\"Packed\"}{"event":"order.updated","note":"Packed"}{\\\"event\\\":\\\"order.updated\\\",\\\"note\\\":\\\"Packed\\\"}{"event":"order.updated","note":"Packed"}Decode only the layers that are present. After one pass, check whether the output is readable JSON or still contains escape sequences. The 1× and 2× buttons are direct actions; choosing 2× runs two passes without requiring a second click.
What changes during unescaping
JSON strings represent some characters with a backslash followed by a short code. A quote inside a string appears as \"; a backslash appears as \\; a line feed is \n; a tab is \t. Unescaping reads those sequences and restores the characters they represent. A value such as \u00E9 becomes é when the containing JSON string is parsed. The JSON specification requires quotes, backslashes, and control characters to be escaped in strings; its string syntax also defines the common codes and Unicode form. See RFC 8259, section 7.
The visible text may change length: \n becomes a line-feed character, and a Unicode escape can become one visible symbol. That is expected. For example, the string "{\"message\":\"Line one\\nLine two\"}" unescapes to JSON text {"message":"Line one\nLine two"}. Formatting that result in the output editor makes the object easier to scan while keeping the message valid JSON.
Choose the right depth
Use one pass when the input has one enclosing JSON string layer. A log field containing {\"event\":\"order.updated\",\"note\":\"Packed\"} should reveal the ordinary JSON document after one decode.
Choose two passes when the value was serialized twice, such as JSON stored in a string that was then written into another JSON log record. The first result may still look escaped; the second removes the remaining layer.
Repeatedly unescaping plain text can change meaningful backslashes. Check the source format or compare with the original payload before applying another pass.
A practical routine
The quickest way to avoid removing too much is to start with the exact field that looks escaped, not an entire surrounding log if it has extra labels or timestamps.
Select the escaped string from your API response, test fixture, database field, or log line. Keep its surrounding quotes if they belong to the value; this tool accepts quoted and unquoted escaped text.
Paste into the input editor, load the built-in sample, or drop a .json, .txt, or .log file. The file is read by the browser.
Use one pass for a single encoded string. Choose two only when you can see that one layer of backslashes remains after decoding once.
Check the output status. If it is valid JSON, use Format to indent it or Minify to compact it, then copy or download. If it is plain text, copy the text without trying to parse it as an object.
A troubleshooting workflow
An API gateway records a field like body as escaped text. The log line shows {\"event\":\"order.updated\",\"note\":\"Packed\"}, and a quick glance makes it difficult to tell whether note contains a normal quote, a newline, or another encoded JSON document. Paste the field value and click Unescape JSON 1×. The result becomes {"event":"order.updated","note":"Packed"}, which is ordinary JSON text again.
Next, check the status above the result. If it says valid JSON, use the output's Format action to expand the object across lines and review its keys. If the decoded value is itself a string containing escaped JSON, use the 2× button directly. Do not press 2× just because there are many backslashes: a Windows path or a regex pattern can contain meaningful backslashes that are not another JSON wrapper.
This distinction is useful in incident reviews. A parser error may come from an outer logging layer rather than the application payload. Decode one boundary, inspect the result, and only then decide whether another layer remains. That keeps the final output tied to the representation the service actually stored.
A response viewer may display a JSON body inside a quoted field. Unescape that field to recover its readable content, then format it if the result is a JSON object or array.
Single-line log messages often encode quotes and line breaks so they can travel inside a JSON record. Unescaping restores the original line breaks and makes nested payloads easier to follow.
Test snapshots, mock fixtures, and configuration files sometimes store a serialized JSON document as text. Decode the required layer before comparing keys or checking values.
Keep the steps separate
Unescaping changes the characters in a string. Parsing checks whether the resulting text follows JSON syntax and turns it into a runtime value; in JavaScript, JSON.parse() performs that separate parsing step. Formatting changes whitespace and indentation for valid JSON. Decode the string layer first, check whether the result is JSON, then format it if you want a readable layout.
If a log excerpt was truncated or the original JSON had a missing comma, unescaping will not repair it. This tool can still show the decoded text, while its output status indicates whether that text parses as JSON. Use a JSON repair tool only when the source itself is malformed, and compare any repairs against the authoritative request or response.
Local processing
This tool runs its unescape and JSON parsing steps in browser JavaScript. Copy, download, sample loading, and local file reading also happen in the browser, so the page does not need to upload the text to decode it. That is useful when reviewing internal test payloads or logs that contain customer data.
Browser-local processing does not change how you should handle the result. Redact tokens, passwords, and personal data before pasting into a ticket, chat, or shared document. Keep diagnostic copies in the same access-controlled systems as the original logs.
Quick reference
| Sequence | Decoded character | Typical place you see it |
|---|---|---|
| \" | Double quote | A quoted string or object key |
| \\ | Backslash | Windows paths and nested escaping |
| \n | Line feed | A multiline message stored on one log line |
| \r | Carriage return | Text from a CRLF line ending |
| \t | Tab | Indented text inside a string |
| \u00E9 | é | Unicode text represented by a code point |
| \/ | Forward slash (/) | An optional escaped slash |
Answers to common questions about decoding a JSON string, nested layers, Unicode, and parser errors.
It reverses JSON string escapes so sequences such as \" and \n become their represented quote and line break. The decoded result is text; if it is a JSON object or array, you can then format it in the output editor.
Move from converting a string to inspecting, validating, or repairing the JSON it contains.
Escape or unescape JSON from the same editor.
Prepare JSON text for one or more string layers.
Trace keys, values, and nesting in a JSON tree.
Repair malformed JSON after decoding a value.
Turn nested object paths into a flat key list.
Learn how to prettify, format, and beautify JSON in Node.js using JSON.stringify, fs module, Express middleware, third-party libraries, and online tools. Includes real code examples.
Learn how to validate JSON data using online tools, JavaScript, Python, and schema validators. Includes common JSON errors, JSON Schema basics, and best practices for developers.
Advanced JSON examples including Schema.org FAQ JSON-LD, API error responses, DynamoDB items, and MongoDB documents. Ideal for testing JSON Viewer and Formatter tools.
Explore enterprise-grade JSON examples including OpenAPI schemas, webhook payloads, Kubernetes and Docker configs, and cloud log monitoring samples for JSON Viewer testing.
Explore a big JSON sample with multiple lists, nested objects, and real-world data points. Perfect for testing JSON Viewer, JSON Formatter, and large API responses.