"category": "utility",

JSON Unescape Tool

"tldr": Paste an escaped JSON string and get readable text - if the result is itself JSON, it is pretty-printed automatically.

Decode an escaped JSON string back into readable text. Paste a value full of \n, \", \t, or \uXXXX sequences - the kind you find in log files, API responses, and double-serialized payloads - and get the original text with real line breaks and quotes.

{"escaped json string": "text"}

If the decoded result is itself JSON (the classic "JSON string inside JSON" problem), the tool pretty-prints it, which makes this the fastest way to read stringified JSON found in logs.

How to unescape a JSON string

  1. 1Paste the escaped string into the input panel - surrounding double quotes are handled automatically.
  2. 2Escape sequences (\n, \", \t, \uXXXX) are decoded back to their real characters.
  3. 3If the decoded text is itself valid JSON, it is pretty-printed for readability.
  4. 4Copy the readable result.

Convert Escaped JSON string to Text in code

JavaScript
const escaped = '"{\\"level\\": \\"error\\"}"';
const once = JSON.parse(escaped);   // '{"level": "error"}' (a string)
const twice = JSON.parse(once);     // { level: "error" } (an object)
Python
import json

escaped = '"{\\"level\\": \\"error\\"}"'
once = json.loads(escaped)   # '{"level": "error"}' (a string)
twice = json.loads(once)     # {'level': 'error'} (a dict)

Frequently asked questions

Why does my API response contain JSON with backslashes everywhere?

That is double-serialized JSON: an object was converted to a JSON string, then embedded as a value inside another JSON document. It usually means one layer too many serialization calls in the producing code. Unescaping reverses one layer at a time.

What are the \uXXXX sequences in my strings?

Unicode escapes - \u00e9 is é, 😀 is an emoji encoded as a surrogate pair. Encoders emit them to keep output pure ASCII. They decode back to normal characters here.

The tool says my input is not a valid escaped string. Why?

Common causes: a stray unescaped quote in the middle, a truncated string copied from a log that cuts off mid-escape, or text that was never actually JSON-escaped. Check that the input either starts and ends with double quotes or contains only complete escape sequences.

How do I unescape in code?

Parse the string as JSON: JSON.parse(escaped) in JavaScript or json.loads(escaped) in Python returns the original text. For double-serialized payloads, parse twice.

Last updated:

You might also need

Free and in-browser, like everything on JSON Console. Browse all tools →