JSON Formatter and Validator: Beautify, Sort and Minify JSON
Paste JSON from an API, log or config file to make it readable, check it is valid and find the exact error.
- Works on your device. Nothing is uploaded.
- Free, no watermark
- No signup
How to use
- Paste JSON or open a .json file.
- Pick 2 spaces, 4 spaces, tab or Minify; sort keys if you want.
- Fix any error shown with its line and column, then copy or download.
Good to know
Our validator follows the JSON standard (RFC 8259) strictly and points to the first problem with its line and column, for example a trailing comma, a missing colon or keys in single quotes. It works the same in every browser because we check the text ourselves before parsing.
Numbers with more than 15 significant digits, such as long order or transaction IDs, lose precision in JavaScript. The tool warns you when it sees one; store such IDs as strings ("1234567890123456789") to keep them exact.
"Sort keys A–Z" sorts object keys at every level, which makes two JSON files easy to compare. Arrays keep their order. Minify removes all spaces for the smallest file, handy for API requests and config values.
Questions
Why does it say "keys need double quotes"?
JSON allows only double quotes. {'a':1} is JavaScript, not JSON.
Are comments allowed in JSON?
No. Standard JSON has no comments, so they are reported as an error.
Can it handle big files?
Yes, several MB work in a modern browser.
Will sorting change my data?
Only the key order changes; values stay the same.
Is my JSON uploaded?
No. It stays in your browser, so it is safe for API responses.