JSON Formatter & Validator
Paste JSON and it is formatted right away. If it is broken, you see where.
How to use
- Paste your JSON into the input box. It is validated immediately and the formatted result appears next to it.
- “Beautify” indents with 2 spaces, 4 spaces or tabs. “Minify” removes all whitespace to a single line. Turn on key sorting only when you need it.
- If something is wrong, the line, the column and the reason appear under the output. Fix it and the check runs again.
Paste {"b":1,"a":[1,2]} with “Sort keys A–Z” on and you get a first, indented by two spaces. With a trailing comma, as in {"a":1,}, you see “Line 1, column 8: Remove the trailing comma.”
FAQ
Are large numbers kept exactly?
Yes. Most JSON tools read numbers as JavaScript numbers, so 12345678901234567890 turns into 12345678901234567000. This formatter copies numbers and strings exactly as written, and 1.0 stays 1.0.
Is my JSON sent anywhere?
No. Validation and formatting happen inside your browser. Only your last input is kept on this device for convenience, and text longer than 50,000 characters is not saved.
Does it accept comments or single quotes?
No. Standard JSON (RFC 8259) has no comments, no single quotes and no trailing commas. The tool points to the exact spot so you can remove them or switch to double quotes.
In what order are keys sorted?
By Unicode code point, so uppercase letters come before lowercase. Duplicate keys are both kept in their original order, and the order of array items is never changed.