JSON Formatter
Prettify, minify, and validate JSON instantly.
Your formatted JSON appears here
Paste JSON on the left and click Format to prettify it or Minify to collapse it to one line. Invalid JSON is flagged with the exact spot to fix — all in your browser.
Runs entirely in your browserFormat and validate JSON, locally
Paste any JSON and this tool re-indents it into clean, readable output or collapses it to a single compact line. If the JSON is invalid it points to the exact spot — with a line and column — so you can fix it fast. Pick a 2-space, 4-space, or tab indent, then copy the result. Everything runs in your browser, so your data is never uploaded to any server.
Common questions
How do I prettify JSON?
Paste your JSON into the box and click Format. The tool parses it and re-indents it with the indent size you choose, so nested objects and arrays line up cleanly.
What does Minify do?
Minify parses your JSON and re-serializes it with no spaces or line breaks, giving you the smallest valid single-line form — handy for embedding in code or config.
What happens if my JSON is invalid?
The tool shows a clear error message and, where the browser reports it, the line and column of the problem so you can jump straight to the mistake.
Can I change the indentation?
Yes. Choose 2 spaces, 4 spaces, or tabs from the indent selector before formatting. Minify ignores this since it removes all whitespace.
Is my JSON uploaded anywhere?
No. Parsing and formatting happen entirely in your browser tab using the built-in JSON engine. Your data never leaves your device.