Decode a JSON string that contains another JSON document
JSON Unstringify reverses a double-encoded JSON document. It parses the outer quoted string and then validates its content as JSON.
When should you use it?
- Read a JSON response body stored as a string.
- Undo one level of serialization in a log.
- Recover an object from a string-only transport field.
Example: remove one JSON string layer
The inner text is validated as JSON before it is returned in readable form.
"{\"a\":1}"{"a":1}Validate the outside and the inside
The outer input must be one quoted JSON string. After decoding it, the inner text must itself be valid JSON. That second check distinguishes this operation from plain Unescape. It is useful for double-encoded API responses or a log field that stores a serialized object, because the output becomes a document you can validate, format, or inspect as a tree.
Remove the extra layer at its source when possible
A double-encoded response often comes from serializing an already serialized value. Check where the application turns an object into text and whether the response framework serializes that text again. Recovering the inner document helps investigate the issue, but the cleaner API contract is usually to send the intended object or an intentionally documented string field.
How do I decode a double-encoded JSON API response?
Paste the outer quoted JSON string. The tool decodes it, checks that the inner text is a complete JSON document, and returns a readable copy. This is common when an integration stores a JSON body in a string-valued field.
A JSON string containing an object
text"{\"id\":7,\"ready\":true}"The decoded inner value is {"id":7,"ready":true}. If the content is plain prose, use JSON Unescape instead.
Will the tool recursively decode multiple string layers?
It removes one outer string layer and validates the resulting JSON document. Repeat deliberately only when your data format truly contains another serialized layer.
What should you check before using the result?
If the decoded string is ordinary prose, use JSON Unescape instead. The tool removes one string layer; it does not keep recursively decoding nested strings.
Understand JSON syntaxTechnical reference: JSON syntax and interoperability · RFC 8259