How to use the JSON formatter and validator
- Paste your JSON.
- Choose the indent and whether to sort keys.
- If it is not valid, the check shows the line and column to fix.
- Copy or download the formatted JSON.
Worked example
{"b":1,"a":[1,2]} becomes neatly indented JSON. {"a": 1,} is reported as invalid at line 1, column 9 (the extra comma).
How it is worked out
Your browser's built-in JSON parser checks the text; a small strict scanner finds the exact place of an error.
Limits
- Comments and trailing commas are not allowed in standard JSON.
About the JSON formatter and validator
JSON formatter and validator — a free browser tool. Pretty print JSON, sort keys, and see exactly where invalid JSON breaks.
Use it when you need a quick, reliable result without installing an app or creating an account. Everything runs on your device, so what you type, paste or open is not uploaded, stored or logged.
Questions and answers
Is JSON formatter and validator free to use?
Yes. JSON formatter and validator is free, with no sign-up, no trial and no hidden cost.
Do my files or text leave my device?
Everything happens in your browser. What you type or choose is not sent to us, stored or logged.
What are the limits?
Comments and trailing commas are not allowed in standard JSON.
Can I use JSON formatter and validator on a phone?
Yes. It works in current versions of Chrome, Safari, Firefox and Edge on phones, tablets and computers.
Privacy
Everything happens in your browser. What you type or choose is not sent to us, stored or logged.