JSON is everywhere — API responses, config files, log lines — and it's easy to end up with a wall of minified text or a file that won't parse because of one stray comma. A formatter fixes both.
Pretty-print vs minify
- Pretty-print (format) adds indentation and line breaks so JSON is readable while you debug.
- Minify strips all whitespace to make the file as small as possible for production.
You want both at different times, and switching between them should take one click.
How to do it
Open the JSON Formatter, paste your JSON, and choose Format or Minify. If the JSON is invalid, it tells you exactly where the problem is instead of silently failing.
Because it runs entirely in your browser, you can safely paste JSON that contains tokens or private data — nothing is uploaded.
The most common JSON mistakes
- Trailing commas —
{"a": 1,}is invalid. - Single quotes — keys and strings must use double quotes.
- Unquoted keys —
{a: 1}is not valid JSON. - Missing brackets — every
{and[needs its pair.
Run your text through the validator and these jump out immediately.
Want to know more about the format itself? Read what is JSON.