JSON Unescape & Cleaner

Remove backslashes, fix escaped quotes, and clean up stringified JSON into valid, readable JSON.

Input
Clean JSON
Try an Example
What This Tool Does
Remove Backslashes
Turns \"" and \\\
HTML Entities
Decodes ", &, <, >
Pretty Print
Formats the result with your chosen indentation
Validate JSON
Shows a clear error if the result is still invalid JSON

Frequently Asked Questions

Escaped JSON occurs when a JSON object is serialised as a string value inside another context — for example, logged to a file, stored in a database column, sent as a form field, or returned inside a JSON string field. Double quotes get prefixed with a backslash (\"), making the output human-unreadable and unusable until it is unescaped.

Common situations: API responses where JSON is returned as a string value (e.g. {"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.

Double-escaped JSON happens when already-escaped JSON is escaped again, producing strings like \\\"id\\\". This tool handles multiple levels — it repeatedly unescapes until it reaches valid parseable JSON.

No. All processing happens entirely in your browser using JavaScript. Nothing you paste is transmitted anywhere. It is safe to use with sensitive payloads, API keys, or private data.

Double-escaping happens when a JSON string is serialized more than once. For example, a JSON object gets serialized to a string with 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.

JSON strings use backslash escape sequences for special characters: \" (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.

A JSON object is the actual data structure: {"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.

Use 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.

The \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.

First, copy the raw escaped string from your log line. Paste it into this tool — it will strip the outer escaping and pretty-print the inner JSON. Alternatively, in a browser console run 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

Related Articles

View all articles
JSON Inside JSON: Why Some Fields Are Strings Containing Their Own JSON, and How to Parse Them

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.

Jun 15, 2026
JSON Patch, Merge Patch, JSON Pointer, and JSON Path: The Standards Most Developers Don't Know

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.

Jun 14, 2026
JSON Parsing in Python, JavaScript, Go, and Ruby: Edge Cases That Cause Real Bugs

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.

Jun 10, 2026
Why JSON Gets Double-Encoded — and How to Detect and Fix It

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.

Jun 9, 2026
JSON Unescape & Cleaner — Fix Escaped and Double-Encoded JSON Instantly

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.

Jun 6, 2026