JSON Formatter, Validator & Minifier

Validate JSON syntax, make compact JSON readable, or minify it for copying. Your input is processed in your browser.

Maximum 2 MB. Uses standard JavaScript JSON parsing: duplicate keys keep the last value; integers above 9,007,199,254,740,991 should be quoted to preserve precision.

Your files and tool inputs never leave this browser. This tool is free to use, with no account and no limit.

How to use this tool

  1. Paste your JSON into the input.
  2. Choose 2 spaces, 4 spaces or Minify, then validate and format.
  3. Correct any syntax error, then copy or download the valid result.

Pretty-print an API response or minify configuration data

Formatting changes indentation and whitespace, not the intended data structure. For example, {"ready":true,"count":2} can be expanded into readable lines or kept compact. JSON requires double-quoted keys and does not allow comments or trailing commas. This validates syntax, not a JSON Schema.

Frequently asked questions

What happens to invalid JSON or large integers?
Invalid JSON shows a syntax error and nothing else happens. Standard JavaScript parsing keeps the last duplicate key and may round integers above the safe integer range; quote large numeric identifiers.
Can I minify JSON with this formatter?
Yes. Choose Minify in Formatting. The output removes indentation and unnecessary whitespace while keeping valid JSON values.