JSON errors are the worst kind: the file looks fine until the parser chokes on it. A missing comma, a trailing comma, or a stray comment — and suddenly your config won’t load.
Our JSON formatter formats and validates JSON in your browser, with no upload.
What “formatting” JSON means
Machines don’t care about whitespace, so JSON from APIs and build tools is often minified — the entire object squeezed onto one line. Formatting re-indents it so the structure is visible:
{"name":"Ada","roles":["engineer","mentor"]}
becomes:
{
"name": "Ada",
"roles": ["engineer", "mentor"]
}
Nothing about the data changes — only its shape on the screen. That’s why formatting is safe to run on anything, including production configs.
The validation half
The same pass that formats also parses — and that’s where broken JSON shows up. The formatter catches the classic errors:
- Trailing commas —
{"a": 1,}is legal in JavaScript but invalid in JSON. This single mistake breaks more configs than everything else combined. - Single quotes — JSON requires double quotes. Copy-pasting from JavaScript is the usual culprit.
- Comments — JSON has no comments. If you need them, you’re editing a config format like JSON5 or YAML, not JSON.
- Bare keywords —
true/false/nullmust be lowercase;Trueis not JSON.
If the formatter shows an error instead of output, the parser found the exact character position — usually enough to spot the missing comma in seconds.
When the structure is fine but the data is wrong
Formatting validates syntax, not meaning. A JSON that parses can still have the wrong field names or types. For data-shape work, the CSV ↔ JSON converter helps you eyeball tabular data, and keeping formatted output around makes diffs in version control actually readable.