How to format and validate JSON
A minified API response or config file is unreadable in one line. Paste it into a formatter to indent it properly, and let the validator pinpoint any syntax error — a missing comma, a stray bracket — before it breaks your build.
Open the free json formatter & validator →Free · no signup · no watermarks
Step by step
- Open the JSON formatter. Start the free formatter and validator.
- Paste your JSON. Drop in the minified response, config, or log fragment.
- Format it. Pretty-print with your preferred indentation to make the structure readable.
- Fix anything flagged. If validation fails, the error message points at the offending line — correct it and re-check.
- Copy the result. Take the formatted (or re-minified) output back to your editor.
Tips that save a second try
- JSON requires double quotes around keys and strings — single quotes are the most common validation failure.
- Trailing commas after the last item are valid in JavaScript but not in JSON.
- Minify before shipping and pretty-print for reading; the data is identical either way.
Common questions
Is it safe to paste API responses with real data?
The formatting happens entirely on your device and nothing you paste is uploaded or stored. Even so, it's good practice to redact credentials and tokens out of habit before sharing data with any tool or colleague.
What is the most common JSON syntax error?
Missing or extra commas cause most failures, followed by single quotes instead of double quotes and unclosed brackets. A validator points at the exact line, which makes each of these a ten-second fix.