JSON Formatter & Validator
Paste a JSON document and format it with the indentation you choose, or minify it for production. Detects syntax errors with clear messages and the exact position of the problem.
Operation
Result
How to use: JSON formatter
- 1Paste your JSON into the editor.
- 2Pick the operation (format, validate or minify) and the indentation.
- 3Review any errors and copy the result.
What is it for?
- Read API responses that arrive on a single line.
- Find the comma or brace that breaks a JSON document.
- Minify JSON before sending or storing it.
Formatting, validating and minifying JSON
The most common syntax errors
JSON is stricter than a JavaScript object. The usual culprits are trailing commas after the last item, single quotes instead of double quotes, unquoted keys, comments (not allowed) and values such as undefined or NaN, which do not exist in JSON. The formatter points to the position of the error so you can fix it without scanning by eye.
When to format and when to minify
Formatting (with 2 or 4 space indentation) is for people: reviewing API responses, debugging configuration or comparing versions in a diff. Minifying strips whitespace and line breaks to reduce size when transmitting or storing; on large payloads the saving can exceed 20 %, although with gzip or brotli compression the difference shrinks considerably.
Big numbers and precision
JSON puts no limit on the size of numbers, but JavaScript uses 64-bit floating point and can only represent integers exactly up to 9,007,199,254,740,991 (2^53 − 1). 64-bit identifiers, such as those used by some databases and social networks, can be corrupted when parsed; the safe practice is to send them as strings.
Privacy
The JSON you paste is processed entirely in your browser. You can format responses containing internal data without it leaving your machine, although it is still wise not to paste real secrets (tokens, keys) into any tool you do not control.
Related tools
Related articles
Frequently asked questions
How does it flag errors?+
It shows the line and column of the syntax error with a hint about the expected character.
Does it handle large JSON?+
Yes, although files of several megabytes may slow down the browser.

