JSON unescape
online.
Paste escaped JSON, such as text copied from a log or a database column, and get the object back. The tool removes one string layer at a time and tells you how many it unwrapped.
Your formatted JSON will appear here.JSON Unescape example
{\"order\":1042,\"items\":[\"cable\",\"plug\"]}{
"order": 1042,
"items": [
"cable",
"plug"
]
}What unescaping JSON means
Inside a JSON string, a quote is written as \" and a backslash as \\. When a whole JSON document is stored inside another string, all of its quotes pick up a backslash. Unescaping reads that string layer with a JSON parser and returns the document it contains.
The tool accepts three common shapes:
- A quoted JSON string:
"{\"id\":17}" - Escaped text without the outer quotes, as many log viewers show it:
{\"id\":17} - Double-encoded JSON, where the string was serialized twice:
"\"{\\\"id\\\":17}\""
Why not just delete the backslashes?
A search and replace cannot tell an escape that belongs to the outer string from one that belongs to your data. Deleting them all breaks a Windows path such as "C:\\reports", a quote inside a message, or an escaped newline. A parser removes exactly one layer of escaping and keeps the characters your data needs. Our guide to escaped and double-encoded JSON shows this with runnable examples.
Count the layers
After converting, the output footer shows how many string layers were unwrapped. One layer is normal for a JSON field stored as text. Two or more usually means a program called a serializer twice, for example JSON.stringify on a value that was already JSON text. Fix that at the source if you can, so every consumer does not have to unwrap the extra layer.
Keep a string when you mean a string
The tool keeps unwrapping while the text parses as JSON, so a quoted "123" becomes the number 123. If a top-level string must stay text, use the JSON formatter, which keeps the value exactly as parsed.
JSON Unescape questions
Is unescaping the same as removing backslashes?
No. Unescaping parses one string layer, which removes only the backslashes that the outer string added. Backslashes that belong to your data, such as those in a file path, stay.
What if my escaped text has no outer quotes?
Paste it anyway. When the input is not valid JSON but contains escaped quotes, the tool wraps it in quotes, parses it as a string, and then parses the result.
How many layers can it unwrap?
It parses the input and then up to 32 further string layers, stopping as soon as the value is no longer a string that contains JSON.
Does my JSON leave my browser?
No. Unescaping runs in your browser. Nothing you paste or upload is sent to a server or stored.