JSON Formatter

Format and validate JSON with syntax highlighting.

Paste a JSON payload on the left and a pretty-printed version appears on the right. Invalid input is rejected with the exact parser message so you can find the offending character — trailing comma, missing quote, control character, whatever it is.

Common use cases: cleaning up minified API responses before pasting into a bug report, sanity-checking a config file before committing, validating webhook payloads, and eyeballing whether two JSON blobs are structurally identical after re-indentation.

Input

Output

Frequently asked questions

What does the JSON formatter do?
It parses the JSON you paste, validates it against the JSON spec (RFC 8259), and re-serialises it with two-space indentation. If the input is invalid, you get the exact parser error so you can locate the problem.
Does my JSON leave the browser?
No. Formatting and validation run entirely in your browser using JSON.parse and JSON.stringify. Nothing is uploaded, logged, or stored.
Why is my JSON invalid?
The most common causes are trailing commas, single quotes around strings or keys, unquoted keys, and unescaped newlines inside string values. JSON is strict — none of those are allowed. Copy the parser error into the input column to jump to the offending position.
How big a payload can I format?
Anything your browser can hold in memory. In practice, files under ~50 MB format instantly on a modern laptop. Very large payloads may make the textarea sluggish, not the parser.
Can I minify JSON here too?
This tool prettifies. To minify, run JSON.stringify(JSON.parse(input)) in any JavaScript console — single-line output with no whitespace.