JSON Formatter & Validator Online
Beautify, minify, and validate JSON instantly. Detects syntax errors with line numbers.
About this tool
How to format and validate JSON
Paste your JSON into the box. Valid input is re-printed with consistent indentation so the structure is readable; invalid input produces an error telling you what went wrong and roughly where.
Why minified JSON needs this
APIs send JSON with every unnecessary byte removed, no line breaks and no indentation, because it travels faster that way. It is also unreadable. A response with nested objects several levels deep becomes one enormous line, and finding the field you care about, or the bracket you failed to close, is hopeless by eye. Formatting restores the shape so you can actually see the hierarchy.
The errors you will hit most
- Trailing commas. Legal in JavaScript, illegal in JSON. The comma after the last item in an array or object is the single most common cause of a parse failure.
- Single quotes. JSON requires double quotes, on both keys and string values.
- Unquoted keys.
{name: "x"}is a JavaScript object literal, not JSON. - Comments. JSON has none. If a config file contains
//lines, it is JSON5 or JSONC, not JSON. - Smart quotes. Text pasted out of a word processor often carries curly quotes that look right and parse wrong.
Frequently asked questions
Does formatting change my data?
No. Only whitespace changes; keys, values and order are preserved exactly.
Can it handle large files?
Yes, within your device's memory. Very large documents may take a moment to re-render.
Is my JSON uploaded?
No. Parsing happens in your browser, which matters because API responses so often contain keys, tokens and customer data.
Why does my valid-looking file fail?
Check the very end first. An unclosed bracket at the top usually reports as an error at the bottom, where the parser finally runs out of input.
Written and maintained by Nudge Systems, Surat
Last reviewed