Paste minified JSON from an API or config file to make its structure readable, or minify it for transport. Errors are reported with a line and column so you can fix them fast.
How to use
- Paste JSON.
- Choose Beautify, Minify or Sort keys.
- Pick an indent and copy the result.
Common JSON mistakes
Keys and strings need double quotes, trailing commas are not allowed, and comments, NaN and undefined are not valid JSON. Leading zeros like 007 aren’t allowed either; use a string or null instead.
Why sort keys?
Sorting both files before a diff hides meaningless order differences.
Sorting goes all the way into nested objects, but array order is left alone, since order usually means something in an array. Keys are sorted by character code, so a key starting with a capital (Zip) comes before a lowercase one (age).
Reading the error position
The error text comes straight from your browser, and when it includes a position the tool converts it into a line and column. That spot is where the parser got stuck, so the real mistake is often just before it. Paste {"a":1,} in Chrome and it points at line 1, column 8, the closing brace. The fix is the comma in front of it.
When values change
The tool parses your JSON and writes it back out, so 1.50 becomes 1.5 and a duplicated key silently keeps only its last value. Integers above 9007199254740991 can’t be stored exactly as JavaScript numbers: 12345678901234567890 comes out as 12345678901234567000. Send very long IDs as strings.
FAQ
Is my JSON uploaded?
No. Everything runs in your browser. It’s still a good habit to strip passwords and keys before pasting.
Does it accept JSON5 or comments?
No, only standard JSON. Comments are reported as errors.