JSON Unescape Online — Decode JSON Strings

Decode JSON escape sequences — \n, \t, \", \\, and \uXXXX — back to their original characters. Restore nested-stringified payloads instantly, 100% in your browser.

What is JSON Unescape?

JSON unescape is the inverse of JSON string escaping. It walks an escaped string and replaces every \n, \t, \", \\, and \uXXXX sequence with the literal character it represents — restoring the raw text that was originally encoded for transport inside a JSON document.

When an API returns a JSON field as a string, when a webhook payload double-encodes its body, or when a log aggregator stores a structured event as a quoted string — the value reaches you with backslashes everywhere. The OpenFormatter JSON unescape tool decodes it back to readable form using the browser's native JSON.parse, entirely on your machine.

How to JSON unescape online — 4 steps

  1. Paste your escaped string. Copy the value from a log line, an API field, or a stringified payload into the Input panel. Surrounding double quotes are optional.
  2. Click Unescape. The tool feeds your input to JSON.parse and resolves every standard JSON escape in a single pass.
  3. Inspect the output. Newlines and tabs become real whitespace, \uXXXX codes resolve to their characters, and double-escaped backslashes collapse to single ones.
  4. Copy and continue. Click Copy and paste the decoded text into your editor, JSON Formatter, or downstream tooling.

Side-by-side example

Escaped input

{\"user\":\"Jane O\u0027Reilly\",\"bio\":\"Line 1\nLine 2\",\"path\":\"C:\\\\Users\"}

Decoded output

{"user":"Jane O'Reilly","bio":"Line 1
Line 2","path":"C:\\Users"}

All Standard Escapes

Decodes \" \\ \/ \b \f \n \r \t and four-hex-digit \uXXXX Unicode escapes — exactly the set RFC 8259 defines.

Unicode & Emoji

Surrogate pairs combine into single emoji or supplementary-plane glyphs. CJK, Arabic, and accented Latin all round-trip cleanly.

Client-Side Only

Decoding runs via JSON.parse inside your browser. Secrets in escaped log lines or API responses never reach a server.

Common use cases

  • check_circleDecoding log lines where structured events are stored as JSON-escaped strings
  • check_circleRestoring nested-stringified payloads embedded in webhook bodies
  • check_circleReading double-escaped JSON returned from queue systems and SQS messages
  • check_circleConverting \n and \t in API error messages back to readable multi-line text
  • check_circleResolving \uXXXX Unicode escapes to actual characters before display
  • check_circleDecoding the request body field of a JSON request log entry
  • check_circleCleaning up JSON-string fields from CloudWatch, Datadog, or Splunk exports
  • check_circlePreparing JSON-encoded assertion messages for human review in test reports

JSON unescape vs JavaScript unescape — when to use each

JSON defines a deliberately small escape set: \" \\ \/ \b \f \n \r \t \uXXXX. Anything else triggers a parse error. JavaScript string literals accept a wider set including \x, \0, octal, and arbitrary identity escapes. If your input came from a JSON document, log line, or HTTP response — use this tool. If it came from a JavaScript source file or a JSON.stringify-mismatched value, the JavaScript Unescape tool will accept the broader syntax.

Need to escape instead?

Re-encode raw text into JSON-safe escapes, or chain with our other escape tools — all browser-side.

Frequently Asked Questions

What does JSON unescape actually do?

It walks the input string and replaces every JSON escape sequence with the character it represents: \n becomes a real newline, \t becomes a tab, \" becomes a double quote, \\ becomes a single backslash, and \uXXXX becomes the Unicode code point matching the four hex digits. The output is the raw text that was originally encoded into JSON.

Why does my output still contain backslashes after unescaping?

You almost certainly have a double-stringified payload — the value was JSON-encoded twice. After one unescape pass you still see \n, \", and \\ because the inner string was escaped first, then the whole thing escaped again. Run unescape a second time on the output to reach the original content. APIs that return JSON-as-string fields (common in webhooks and queue messages) produce these.

Should I include the surrounding double quotes when pasting?

Either works. If your input starts with a double quote, the tool treats it as a complete JSON string literal. If it does not, the tool wraps it in quotes before parsing. Both code paths produce the same decoded output for valid escape sequences.

How are \uXXXX Unicode escapes decoded?

JSON.parse converts every four-hex-digit escape to its UTF-16 code unit. Surrogate pairs (used for characters above U+FFFF like emoji) need to appear as two consecutive 🚀-style escapes; the parser combines them into a single emoji. Lone surrogates produce malformed output and may surface as a parse error.

How do I decode a nested-stringified JSON value inside an outer JSON object?

Copy just the string value of the field (between its outer quotes) into the input. The unescape resolves it back to the inner JSON document — which you can then paste into the JSON Formatter or Validator to inspect. This is the typical workflow for log entries that store a JSON event as a string field.

Does this validate that the surrounding JSON is well-formed?

No. This tool decodes a single string scalar. Pass full documents through the JSON Validator to confirm the document parses cleanly and structures match what you expect.

Is my JSON sent to a server?

No. Decoding runs in your browser via the native JSON.parse implementation. Tokens, secrets, and PII embedded in escaped strings never leave the page. Verify in DevTools → Network — no request is fired when you click Run.

What happens if my input contains an invalid escape like \x or \z?

JSON only defines a fixed set of escapes (\" \\ \/ \b \f \n \r \t \uXXXX). Anything else — \x, \z, \a — triggers a parse error and the tool surfaces it. If you are decoding a JavaScript string literal (not JSON), use the JavaScript Unescape tool, which accepts the broader JS escape set.

JSON Unescape Online — Decode JSON Strings | OpenFormatter