Validate JSON syntax, then pretty-print or minify it
A tool that checks whether your JSON is valid using the browser's own native JSON parser, then either pretty-prints it for readability or minifies it down to one line — not a regex guess, a real parse.
Paste your JSON.
Pick an indentation style.
Click Validate & Format (or Minify), then copy the result.
Format spreads valid JSON across multiple lines with your chosen indentation, so it's easy to read. Minify strips every unnecessary space, tab, and line break down to a single line, for the smallest possible payload — useful before sending JSON over the wire.
When the JSON isn't valid, the status badge shows the browser parser's own error message — for most syntax errors this includes the character position where parsing failed, which is enough to find the problem: a missing comma, an unquoted key, a trailing comma, or an unclosed bracket.
No — this validates strict, standard JSON only. Comments, trailing commas, and unquoted keys are all invalid in standard JSON and will correctly fail validation here, even though some JSON-adjacent formats (like JSON5 or JSONC) allow them.
Key order within an object is preserved exactly as written. If a key appears twice in the same object, the parser silently keeps only the last value for it — that's standard JSON.parse behavior, not something this tool changes or warns about.
Paste a minified API response to read it properly and spot what's wrong.
Catch a stray comma or missing quote before it breaks a build.
Minify JSON before embedding it or sending it over a slow connection.
Yes. It uses the browser's own native JSON.parse, so a genuine syntax error is reported with the browser's own message, not guessed at with a regex.
It shows the browser parser's own error message, which for most syntax errors includes the character position in the text where parsing failed.
Format (pretty-print) spreads valid JSON across multiple lines with your chosen indentation, for readability. Minify strips all unnecessary whitespace down to a single line, for the smallest possible size.
Key order within an object is preserved as written. If the same key appears twice in one object, valid JSON parsers (including this one) silently keep only the last occurrence — that's standard JSON.parse behavior, not something this tool adds.
No. This validates strict, standard JSON only — no comments, no trailing commas, no unquoted keys. Any of those will fail validation, which is correct behavior for standard JSON.
No. Validation, formatting, and minifying all happen entirely in your browser. Nothing you paste here is uploaded anywhere.