A single missing comma can break an API request, and a minified API response is painful to read. This formatter does both jobs: paste JSON to pretty-print it with clean indentation and syntax colours, validate that it is well formed, or minify it into a single compact line for production use. Errors are flagged as soon as you paste.
Formatting runs locally in your browser, which matters when the JSON contains tokens, customer data or config secrets. Nothing is sent to a server.
Last updated: 21 November 2026.
| Mode | Output | When to use |
|---|---|---|
| Pretty print | Indented, multi-line | Reading API responses, debugging configs |
| Minify | One compact line | Pasting into code, saving bytes |
| Validate | Error position if invalid | Checking hand-edited JSON before an API call |
| Indent 2 or 4 spaces | Your preferred style | Matching your project's conventions |
No. Parsing and formatting use browser JavaScript only, so API keys and personal data in your JSON stay on your device.
Common causes are trailing commas, single quotes instead of double quotes, or an unquoted key. The error hint points to the problem.
Minifying removes whitespace and line breaks so the JSON is one compact string, reducing size without changing the data.
Yes. Switch between 2 and 4 spaces to match your project style.
Yes. Deeply nested structures are indented level by level and remain valid.
It reports the error so you can fix it; automatic repair can change meaning, so it is deliberately not attempted.