How to format JSON online
- Paste your JSON into the input box (or click Sample to try it).
- Click Format to beautify with your chosen indentation, or Minify to strip whitespace.
- Copy the result or download it as a
.jsonfile.
Common JSON errors this validator catches
- Trailing commas —
{"a": 1,}is invalid JSON (valid in JavaScript, not JSON). - Single quotes — JSON requires double quotes around keys and string values.
- Unquoted keys —
{a: 1}works in JavaScript but not JSON. - Missing commas or brackets — the error message points you at the exact line and column.
Frequently asked questions
How do I format messy JSON?
Paste your JSON into the input box and click Format. The tool re-indents it with your chosen indentation (2 spaces, 4 spaces or tabs) and validates it at the same time.
What does the validator tell me when JSON is invalid?
You get the exact parser error with the line and column number of the problem — usually a missing comma, a trailing comma, unquoted keys, or single quotes instead of double quotes.
What's the difference between beautify and minify?
Beautify (Format) adds indentation and line breaks so humans can read the JSON. Minify strips all whitespace to make the payload as small as possible for transmission or storage.
Is it safe to paste production API responses here?
Yes. The formatter runs entirely in your browser — nothing you paste is uploaded, logged or stored anywhere.