About This Tool
Paste JSON to check its syntax and reformat it with the indentation you choose: two or four spaces, a tab, or minified to one line, with the option to sort keys alphabetically. When the syntax is wrong you get the line and column of the problem instead of output, so a long file does not have to be bisected by hand.
Duplicate keys are found by a separate scan. JSON.parse raises no error when a key appears twice; it quietly keeps the last value, so the parsed result cannot tell you a collision ever happened. This tool records the line where each key first appeared and the line where it repeated, and lets you either leave the duplicates in place or keep only the last value. Checked against the RFC 8259 grammar as of October 2026.
Numbers are copied through with their original spelling, so a long integer or a value written as 1.0 comes out unchanged. Unicode escapes inside strings, by contrast, are resolved to the actual character, which can change the byte count. Comments, unquoted keys and trailing commas are not JSON and are rejected. This tool does not estimate compression savings and does not validate data against a schema.
Frequently Asked Questions
JSON.parse keeps only the last value for a repeated key and raises no error. So writing the same key twice in a config file silently discards the earlier setting, and the parsed object cannot reveal it. This tool scans the text itself and gives you the line numbers.
JavaScript numbers are only exact up to two to the fifty-third power, so converting a larger value changes its trailing digits. This tool copies number literals through character for character, so reformatting never alters a value.
It does not estimate how much minifying would save and it does not validate data against a JSON Schema. It checks syntax, reformats, and finds duplicate keys.