Tech / JSON Parser & Formatter
JSON Parser & Formatter
Paste or open JSON to check it, format it, minify it or explore it as a tree. Errors show the exact line and column. Everything runs in your browser - your data is never uploaded.
Tip: in the Tree view, click any key to see and copy its path (for example items[0].name). Files up to a few megabytes work smoothly on a phone.
About JSON
JSON (JavaScript Object Notation) is a plain-text format for data. Most web APIs and many configuration files use it, and its rules are set out in RFC 8259. A JSON value can be an object { }, an array [ ], a string, a number, true, false or null.
The most common JSON errors
- A comma after the last item -
{"a": 1,}is not valid. - Single quotes - keys and strings need double quotes:
"name", not'name'. - Keys without quotes -
{name: "Binu"}is JavaScript, not JSON. - Comments - JSON has no
//or/* */comments. - Special numbers -
NaN,Infinityand leading zeros such as012are not allowed. - Line breaks inside a string - they must be written as
\n.
Format or minify?
Format adds line breaks and indentation so people can read the data. Minify removes the spaces to make it smaller to send over a network. Both keep exactly the same data.
Is it safe to paste private data here?
The checking and formatting run in your browser, so the text you paste is not uploaded. Even so, it is a good habit to remove live passwords, API keys and personal details from JSON before you paste it into any website or share it with others.