JSON looks simple enough to write by hand until a single trailing comma or an unquoted key quietly breaks it — and because JSON has no comments and no forgiving parser built into most tools, the resulting error is often a flat "Unexpected token" with no indication of what's actually wrong. This tool formats, minifies, and validates JSON entirely in your browser, and when something doesn't parse, it points at the exact line and column instead of leaving you to scan the whole file by eye.
Format, minify, or browse as a tree
Three output modes cover the three reasons people actually reach for a JSON tool. Format adds readable indentation (2 spaces, 4 spaces, or a tab, your choice) for writing, debugging, or reviewing a config file or API response. Minify strips that back down to the shortest valid representation — the version that actually belongs in a production response, where every byte of whitespace is pure overhead. Tree renders the parsed structure as a collapsible, color-coded outline instead of flat text, which is often the faster way to find one specific field buried in a large, deeply nested payload than reading indented text top to bottom.
An optional "sort keys alphabetically" toggle reorders every object's keys recursively before formatting or minifying — useful specifically for diffing two versions of the same JSON, since a tool that diffs text literally will show every line as changed if the key order differs, even when nothing of substance did.
Reading a validation error
When the input doesn't parse, the error box shows the line and column where the parser gave up, plus the underlying message. It's worth knowing that this location is where parsing stopped, not necessarily where the mistake was made — a missing comma between two object properties, for instance, isn't detected until the parser reaches the next line and finds something it didn't expect there, so the reported line is often one past the actual problem. If the flagged line looks fine on its own, the line directly above it is the next place to check.
Fixing the two mistakes that cause most "broken" JSON
An enormous share of JSON that fails to validate isn't actually broken data — it's a JavaScript object literal that got copied and pasted as if it were JSON, and the two formats are similar enough that the difference is easy to miss. JavaScript object literals tolerate a trailing comma before a closing } or ]; JSON does not. JavaScript tolerates an unquoted key like {name: "value"}; JSON requires {"name": "value"}. The Try to fix button repairs both automatically, which resolves the large majority of real-world "why won't this validate" cases in one click. It deliberately doesn't attempt to fix single-quoted strings, since converting those safely requires understanding exactly where a string starts and ends — something a quick text replacement can get wrong in a way that silently corrupts otherwise-valid data, which defeats the point of a "fix."
A JSON document can be perfectly well-formed and still be missing a field your code expects, have a string where a number belongs, or use the wrong key name entirely — none of which a syntax validator like this one is designed to catch. That's the job of JSON Schema validation, a separate and more specialized check against a shape you define, not something this tool does.