About JSON formatter
JSON is easy for machines to read and miserable for humans when it arrives as one unbroken line. This tool re-indents it into something you can scan, and tells you precisely where the syntax breaks when it will not parse at all.
Paste your JSON and it is validated immediately. Valid input comes back formatted with your chosen indentation. Invalid input produces an error naming the line and column where parsing stopped, which is almost always a character or two after the actual mistake — a trailing comma on the previous line, an unclosed bracket, or a quote that was never terminated.
The four most common causes of invalid JSON. A trailing comma after the last item in an object or array is legal in JavaScript and illegal in JSON, and it is far and away the most frequent cause. Single quotes are also legal in JavaScript but JSON requires double. Unescaped newlines inside a string will fail. And keys must always be quoted, even when they look like plain identifiers.
Minify strips every space and newline. That is what you want before sending JSON over the wire or embedding it in another file, where the formatting is pure overhead. Sort keys reorders every object alphabetically, all the way down — useful when diffing two config files that hold the same data in a different order, since it makes the real differences visible instead of drowning them in reordering noise.
Everything runs in your browser. The text you paste is never sent anywhere, which matters more than it might seem for JSON specifically: API responses and config files routinely contain access tokens, connection strings, internal hostnames and customer records. Pasting those into a server-side formatter hands all of it to someone else. Here the parsing happens on your own machine, and the page has no network permission to send it even if it wanted to.
Limits. Input is capped at 16 MB, which is far beyond what is comfortable to read anyway. Very large documents will format fine but your browser may struggle to render the result — for those, minify is the faster operation.
Questions
Is my JSON sent to a server?
No. Parsing and formatting happen in your browser. The text never leaves your device, and our Content Security Policy prevents the page from uploading it.
Why does it say my JSON is invalid when it looks fine?
The usual causes are a trailing comma after the last element, single quotes instead of double, or an unquoted key. The reported line and column is where parsing stopped, which is often just after the real mistake.
What does sorting keys do to arrays?
Nothing. Array order is meaningful in JSON, so it is preserved. Only object keys are reordered, and it applies at every level of nesting.
Can it handle JSONC or JSON5?
Not currently. Comments and trailing commas are rejected because this validates against strict JSON, which is what most parsers expect.