🔓

JSON String Un-escaper

Paste a heavily escaped JSON string full of backslashes and transform it into a beautifully formatted, syntax-highlighted JSON object. Detects and peels multiple escape layers automatically — fully client-side.

JSON String Un-escaper

Unwrap {\"key\": \"value\"} → beautifully formatted JSON, through every escape layer

Escaped Input
Options:
Indent:

How to Use the JSON Un-escaper

You have copied a JSON payload from a log file, an API error message, or a Slack message, and every quote is backslash-escaped. The string is wrapped in extra layers of escaping and you cannot paste it into your code editor without fixing it first. This tool peels every escape layer in one click and gives you clean, formatted JSON.

Debugging API error responses

A REST API returns an error body where every quote is backslash-escaped — the kind of double-escaped JSON string you get from log files or Slack messages. Paste it, enable Strip outer quotes, and the tool outputs the nested object with proper indentation so you can read the error path at a glance.

Extracting data from double-escaped database fields

Some databases store JSON as a string and escape it again on read. A MySQL JSON column might return a doubly-escaped string where every quote has a backslash, then another backslash wraps the whole thing. Enable Auto-peel all layers and the tool recursively unwraps every pass until it reaches the clean object with name: Alice.

Cleaning up terminal output for documentation

A CLI tool prints escaped JSON to stdout and you need to include the output in a Markdown document. Paste it into the tool, enable Pretty print with 2-space indentation, and copy the highlighted result directly into your documentation.

Inspecting triple-escaped strings in environment configs

Docker Compose and some CI systems triple-escape JSON values in YAML files. Use the sample x3 button to see how the tool peels three layers, then paste your own triple-escaped string to get the clean result. The pipeline display shows each intermediate step so you can verify the tool stopped at the right depth.

How the JSON Un-escaper Works

The tool resolves every layer of backslash escaping in your input using sequential parse passes. Each pass calls JSON.parse on the current string, and if the result is still a string, another pass is triggered.

Escape Sequence Detection

The input string is scanned for backslash sequences. Standard JSON escapes include the escaped double quote, escaped backslash, newline, tab, carriage return, forward slash, backspace, and form feed. Each detection pass peels one layer of escaping by calling JSON.parse on the current string. For example, a string where every quote has a backslash in front of it — the kind produced by JSON.stringify — becomes a clean JSON object after one pass because the backslash-quote sequences are resolved into plain quote characters.

Unicode and Entity Decoding

The parser handles Unicode escape sequences natively through JSON.parse, converting them to their actual characters. A sequence like u0041 becomes A, and surrogate pairs like uD83DuDE00 render as a single emoji character. When the Auto-peel option is enabled, the tool recursively unwraps every JSON stringification layer until a non-string value is reached, regardless of depth.

Pipeline Depth Visualisation

After each unescape pass, the tool records the layer number, the raw input at that layer, and the parsed result. The pipeline display shows each step with a type indicator — string with an arrow means another layer is expected, while a checkmark means the final value has been reached. This lets you verify that the tool stopped at the correct depth, which matters when you have intentionally nested JSON strings.

Error Handling for Malformed Input

After each pass the tool validates whether the result is parseable as JSON. If the input contains mismatched brackets, unterminated strings, or invalid escape sequences, an error banner displays the specific parse failure and the layer number where it occurred. For instance, a string that starts with an opening brace but never closes it will fail at layer 1 with an unterminated string error.

Frequently Asked Questions

What escape sequences does the JSON Un-escaper support?

The tool handles all standard JSON escape sequences: the escaped double quote, escaped backslash, newline, tab, carriage return, forward slash, backspace, form feed, and Unicode escape sequences like u0041. Non-standard escapes may cause a parse error, which the tool will report with the layer number where the failure occurred.

How does the tool handle double-escaped or triple-escaped strings?

Each escape layer wraps the previous output in another round of JSON.stringify. The tool peels one layer per pass by calling JSON.parse. When Auto-peel is enabled, it recursively unwraps every layer until it reaches a non-string JSON value like an object or array. A triple-escaped string — where the JSON was stringified three times — takes three parse passes to reach the clean object with name: Alice.

How is this different from just calling JSON.parse?

A single JSON.parse call only removes one escape layer. If the JSON was stringified twice, one parse pass produces another string rather than an object. This tool runs multiple passes automatically, displays each intermediate step in a pipeline, and includes pretty printing and syntax highlighting — things a raw parse call does not provide.

What is the Strip outer quotes option?

Many serialisation tools wrap the entire JSON string in an extra pair of double quotes before escaping the inner content. When enabled, this option detects and removes that outermost quote pair before the first unescape pass begins, so the tool does not waste a layer resolving quotes that are not part of the data.

Can the tool fix malformed or invalid escaped JSON?

The tool validates the input at each unescape pass. If the string contains mismatched brackets, unterminated strings, or invalid escape sequences, it stops and displays the specific parse error along with the layer number where the failure occurred. It does not attempt to auto-correct invalid JSON.

Is my JSON data sent to a server?

No. All parsing is performed entirely in the browser using the built-in JSON.parse function and the Clipboard API. Your JSON data never leaves your device, and no server-side processing or analytics are involved.

jsonunescapebackslashformatpretty printparseescapestringdeveloperdebug

More Tools You Might Like

↩️JSON String Escaper
📋CSV to JSON & XML Data Converter
🔷JSON to TypeScript Generator
.*RegEx Toolkit — Visualize, Extract & Replace
JSON Payload Schema Validator
JSON Prettifier