JSON Formatter vs JSON Validator
Both tools parse JSON with the same engine (the browser's native JSON.parse, with a lenient
fallback for single-quoted input). The difference is what they do with a successful or failed parse.
| JSON Formatter | JSON Validator | |
|---|---|---|
| Primary job | Re-serialize valid JSON as pretty-printed or minified text | Report whether input is valid JSON, and where it breaks |
| On valid input | Outputs reformatted JSON (2/3/4-space indent, or minified, with optional deep key sorting) | Outputs "Valid JSON.", does not reformat your input |
| On invalid input | Shows an error; does not attempt repair (use JSON Repair for that) | Reports the exact line, column, and character offset of the first syntax error, when the parser provides one |
| Single-quoted JSON | Accepted (converted internally before formatting) | Accepted (converted internally before validating) |
| Use it when | You have valid-ish JSON and want it readable, minified, or key-sorted | You just need a yes/no answer plus a precise error location, without changing the text |
Which one do I want?
If you're pasting JSON to read it (collapsed API responses, minified config files) use the Formatter. If you're debugging why a JSON file fails to parse in your own code and want the exact line/column without altering the text, use the Validator. If the JSON is broken in ways neither tool will reformat (trailing commas, unquoted keys, Python literals), use JSON Repair first.