Format and check JSON without uploading it
Make a wall of minified JSON readable, or find out why a file will not parse. The formatting runs on your device, which matters when the data holds API keys or customer records.
- No sign-up
- No watermark
- No daily limits
- Works on phones too
- Data sent by this page: 0 bytes
How to format and validate JSON
- Paste your JSON into the box on the left. A sample is loaded to start.
- The result appears on the right straight away. Choose the indent, and tick Sort the keys if you want them in order.
- If the JSON is not valid, the message shows the line and column and points at the problem.
- Press Copy or Download .json, or press Minify for a compact version.
Questions people ask
Why paste JSON into a tool that runs in my browser?
JSON often holds secrets and personal data, such as API keys, tokens and customer records. Tools that send the text to a server create a copy you do not control. This one never sends it anywhere.
What is the difference between formatting and minifying?
Formatting adds line breaks and indentation so people can read it. Minifying removes all the extra spaces so the file is as small as possible for sending over a network.
How do I find an error in my JSON?
Paste it in and read the message. It shows the line and column where parsing stopped, with the line and a caret under the problem. The usual causes are a missing or extra comma, a missing quote and single quotes where double quotes are needed.
Why is JSON with a trailing comma invalid?
The JSON standard does not allow a comma after the last item in an object or array, even though many programming languages do. Remove the final comma and it will parse.
Why are my keys in the wrong order?
JSON objects are unordered by definition, and this tool keeps the order you give it. Tick Sort the keys A to Z if you want them alphabetical, for example to compare two files.
Does it change my values?
No. Strings, numbers, true, false and null come out as they went in. Very large integers beyond what a browser can hold exactly may lose precision, which is a limit of browsers rather than of this tool.
Can it handle comments or single quotes?
No. That is JSON5 or JavaScript, not JSON, and the validator will point out the first thing that is not allowed. Remove the comments, and use double quotes, then try again.