json-formatter
Paste any JSON to validate, pretty-print, or minify it. Errors point to the exact line and column, and duplicate keys get flagged even though technically-valid JSON allows them.
client-side only
any JSON
no signup
input.json
Paste JSON on the left and click Format, Minify, or just start typing to validate.
// what gets checked
- Syntax errors — trailing commas, unquoted keys, missing commas, mismatched brackets — reported with the line and column where parsing failed, since most browsers' native error messages just say "Unexpected token" with no location.
- Duplicate keys within the same object — valid JSON technically allows this and silently keeps only the last one, which makes it a quiet source of bugs: the file parses fine, but a value you think is set isn't, because an earlier key with the same name got overwritten later in the same object.
Formatting is for humans — reviewing a config file, debugging an API response, or preparing something to paste into a PR. Minifying is for machines — stripping whitespace before storing JSON in a database column, embedding it in a URL query param, or shipping it over the wire where every byte counts. Both produce identical data; only the whitespace changes.