JSON Unescape & Cleaner

Remove backslashes from stringified or double-escaped JSON. Unescape and pretty-print in one click. Handles deeply nested escaped JSON automatically.

Escaped Input
Cleaned Output

Frequently Asked Questions

Escaped JSON occurs when a JSON object or array is serialized to a string and then that string is embedded inside another JSON string — the inner JSON's double quotes, backslashes, and control characters are escaped with backslashes. This "stringified JSON" appears as a string value containing {\"key\":\"value\"} instead of the parsed object {"key":"value"}. It commonly happens when APIs double-serialize their responses or when data is stored as a JSON string in a database.
Backslashes appear when a string value inside JSON contains characters that must be escaped: \" for a literal double quote, \\ for a literal backslash, \n for a newline, \t for a tab. These are correct and necessary escaping. If you see excessive backslashes like \\\", the JSON has been double-encoded — serialized to a string, then that string was serialized again.
Double-escaped JSON is most commonly caused by: calling JSON.stringify() or json_encode() on data that is already a JSON string instead of a parsed object; storing a JSON string in a field that gets serialized again when the row is returned; API middleware that serializes response data without checking if it's already serialized; or incorrectly using json_encode(json_encode($data)) instead of just json_encode($data).
This tool applies up to 6 rounds of unescaping — repeatedly calling JSON.parse() or string-based unescape until the result stabilizes or is no longer valid JSON. This handles triply or more deeply nested escaped JSON. Each round strips one level of escaping, so even severely mangled JSON can usually be cleaned in one click.
Always encode data once at the final serialization step. In PHP: call json_encode($data) where $data is a PHP array or object — never on a string that is already JSON. In JavaScript: call JSON.stringify(obj) where obj is a parsed object — never on a string. If you receive data that may be a JSON string or a parsed object, check with typeof data === 'string' ? JSON.parse(data) : data before re-encoding.
"Unescape Only" removes backslash escaping and strips surrounding quotes from a JSON string, but does not reformat the result. "Unescape & Format" also pretty-prints the resulting JSON with indentation, making it immediately readable. Use "Unescape Only" if you need the compact output or if the result is not JSON (plain text that was escaped).
Yes. Some systems encode JSON for inclusion in HTML attributes, converting & to &, " to ", etc. This tool includes an HTML entity decode step that converts those entities back to characters before attempting JSON parsing, so HTML-encoded JSON is handled automatically.
If backslashes remain after unescaping, they may be intentional — part of actual string data (e.g. Windows file paths, regex patterns) rather than JSON encoding artifacts. Alternatively, the input may be incomplete or corrupted. Check if the remaining backslashes are double-backslashes \\ (which represent a single literal backslash in the data) — this is correct JSON string encoding of a backslash character.
JSONP wraps a JSON payload in a function call like callback({"key":"value"}). This tool does not strip JSONP wrappers — paste only the JSON portion (the content inside the parentheses). You can extract the JSON manually or use a regex to strip the callback prefix before pasting here.
Yes. All processing happens entirely in your browser using JavaScript — no data is sent to any server. Your JSON is never transmitted over the network. The tool works offline and processes data locally, so it is safe to use with sensitive or proprietary JSON payloads.

About This JSON Unescape Tool

This free JSON unescape tool removes backslashes from stringified or double-escaped JSON and pretty-prints the result. All processing happens locally in your browser using native JavaScript JSON APIs. No data is transmitted.

When to use this tool

  • Cleaning API responses that double-serialize JSON
  • Fixing stringified JSON stored in database text columns
  • Unescaping JSON strings from logs or debugging output
  • Removing backslashes added by incorrect JSON serialization

Related Articles

In-depth guides and technical articles.

View all →
Why \n Shows Up Literally in Your JSON Output — Escape Sequences, Encoding Layers, and How to Debug Them
JSON's \n is two characters in the file (backslash + n) that parse to one character (line feed) — and when encoding is applied in the wrong order or twice, you get literal \n in displayed output, double-escaped \\u sequences, or & where & should be. Here's the three encoding layers that commonly stack incorrectly, the specific corruption patterns and their causes, and why \/ appears in some JSON (HTML injection defence in script tags).
Why JSON.parse() Fails for Large Files — Streaming Parsers, JSON Lines, and When to Use Each
Standard JSON.parse() requires the complete document before returning anything — which fails for large files that exceed memory and real-time streaming APIs that never "finish." Here's how streaming JSON parsers work (event-driven, token-by-token), JSON Lines as a simpler alternative that works with standard parsers, the specific use cases where streaming is necessary vs over-engineering, and when high-volume data transfer argues for protobuf instead of JSON entirely.
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.