JSON Parser - Parse JSON String Online
Paste a stringified JSON value, such as one copied from a log, a database column or an API that encoded JSON twice, and get the real JSON back, formatted and ready to explore as a tree.
How to parse a JSON string
- Paste the stringified JSON into the left editor. It can have its surrounding quotes, such as
"{\"id\":1}", or not, such as{\"id\":1}. - The parsed JSON appears on the right, formatted. Switch to tree view to fold and explore it.
- Copy the result or download it as a .json file.
What is a stringified JSON?
JSON is stringified when a JSON document is stored as the value of a string, so all of its quotes are escaped with backslashes. You see it in log files, in database columns of type text, in message queues, in the body field of AWS Lambda and API Gateway events, and in APIs that call JSON.stringify on a value that is already JSON.
Sometimes the same value has been encoded two or three times, which produces runs of backslashes such as \\\". The parser keeps decoding until it reaches real JSON, up to ten layers, and the status line tells you how many layers it removed.
Parser or validator?
The parser also accepts ordinary JSON, in which case it just formats it. If the input is neither valid JSON nor a valid JSON string, the error is shown with its line and column, as in the JSON Validator. If the string decodes to text that is not JSON, the text is returned as a JSON string.
Example
"{\"order\":{\"id\":1042,\"items\":[{\"sku\":\"A-1\",\"qty\":2}]}}"
becomes:
{
"order": {
"id": 1042,
"items": [ { "sku": "A-1", "qty": 2 } ]
}
}
To turn JSON back into a string, use the JSON Escape tool.
Private by design
The parsing happens in your browser. Logs and payloads you paste here are never uploaded.