JSON Unescape & Cleaner
Remove backslashes, fix escaped quotes, and clean up stringified JSON into valid, readable JSON.
\" → " and \\ → \", &, <, >Frequently Asked Questions
\"), making the output human-unreadable and unusable until it is unescaped.
{"data":"{\"id\":1}"}); payment gateway transaction logs; PHP json_encode() inside another json_encode(); JavaScript JSON.stringify() called twice; database-stored JSON; copied terminal/debug output.
\\\"id\\\". This tool handles multiple levels — it repeatedly unescapes until it reaches valid parseable JSON.
JSON.stringify(), and that resulting string is then stored inside another JSON field — so the inner quotes and backslashes get escaped again. It also occurs when logging frameworks or database drivers escape the string before storing it, or when a JSON payload is passed through HTTP form encoding and then JSON-encoded again. The fix is to serialize only once, or to deserialize the extra layer before processing.
\" (double quote), \\ (backslash), \/ (forward slash — optional), \n (newline), \r (carriage return), \t (tab), \b (backspace), \f (form feed), and \uXXXX (Unicode code point). These are the only valid escape sequences in JSON — unlike JavaScript strings, \0, \s, and hex escapes (\x41) are not valid JSON.
{"key": "value"}. A JSON string is that structure serialized into text — a string of characters that represents the object. When you call JSON.stringify(obj) you get a JSON string. When you call JSON.parse(str) you get back the object. Problems arise when a JSON string is stored inside another JSON string — it looks like "{\"key\":\"value\"}" with escaped quotes, which is what this tool removes.
JSON.parse(str) to deserialize — convert a JSON string into a JavaScript object so you can access its properties. Use JSON.stringify(obj) to serialize — convert a JavaScript object into a JSON string for storage, transmission, or logging. A common bug is calling JSON.stringify on a value that is already a string, which adds an extra layer of escaping. Always check typeof value before serializing if the input source is uncertain.
\uXXXX escape represents a Unicode character using its four-digit hexadecimal code point. For example, é is é and 中 is 中. JSON is Unicode-native — you can include any Unicode character directly in a string, but some serializers escape all non-ASCII characters to \uXXXX for ASCII-safe transport. For characters outside the Basic Multilingual Plane (code points above U+FFFF), JSON uses surrogate pairs: two \uXXXX sequences (a high surrogate followed by a low surrogate). Both forms are valid and semantically identical.
JSON.parse('"…"') (wrap in single quotes and include the outer double quotes). For command-line debugging, pipe the log line through jq -r '.' or use python3 -c "import json,sys; print(json.loads(sys.stdin.read()))". For recurrently escaped payloads in your codebase, add a middleware logging step that deserializes before logging rather than storing the raw serialized string.
About This JSON String Unescaper
This free JSON string unescaper converts a JSON-escaped string — containing \\n, \\", \\t, and other backslash sequences — back to its original readable form. Paste a raw JSON string value (including the surrounding quotes) and see the unescaped result.
JSON strings that have been serialised twice or embedded inside another string often contain double-escaped sequences that are difficult to read. This tool removes one layer of escaping to reveal the actual content.
When to use this tool
- Reading double-escaped JSON from log files or error outputs
- Inspecting error messages embedded inside JSON strings
- Debugging API responses that contain escaped newlines
- Extracting readable content from serialised nested JSON payloads
Standards & References
Related Developer Tools
Related Articles
View all articles
JSON Inside JSON: Why Some Fields Are Strings Containing Their Own JSON, and How to Parse Them
A field containing `"{\"name\":\"Alice\"}"` isn't broken — it's JSON stored as a string, inside a JSON document, a deliberate pattern in logging systems, GraphQL, and webhook relays. Here's how to recognize this pattern by its escaped quotes, why it requires two separate parsing steps, and how to tell when it's a legitimate design choice versus an unnecessary double-stringification bug.
JSON Patch, Merge Patch, JSON Pointer, and JSON Path: The Standards Most Developers Don't Know
JSON Patch (RFC 6902) sends a list of operations (add, remove, replace, test) to modify a resource atomically. JSON Merge Patch (RFC 7396) uses a simpler merge rule. Here's both standards with examples, JSON Pointer path syntax, JSON Path for querying, and why the `test` operation enables optimistic concurrency.
JSON Parsing in Python, JavaScript, Go, and Ruby: Edge Cases That Cause Real Bugs
Python's None vs JSON null, JavaScript's integer precision limit at 2^53, Go's strict struct tags, and Ruby's symbolize_names security concern are real production pitfalls. Here's the JSON parsing edge cases in each major language and how they cause bugs at API boundaries.
Why JSON Gets Double-Encoded — and How to Detect and Fix It
Double-encoded JSON — JSON strings where objects were expected — happens when serialisation runs twice at different layers. Here's how it happens, how to detect it, how to fix it programmatically, and what the common Unicode escape sequences mean.
JSON Unescape & Cleaner — Fix Escaped and Double-Encoded JSON Instantly
Learn what causes JSON to become escaped or double-encoded, how to recognise it, and how to use a free JSON unescape tool to clean up messy JSON from logs, APIs, and databases instantly.