JSON Formatter
Beautify, minify and validate JSON. When it breaks you get the exact line and column, not just 'unexpected token'. Runs entirely in your browser.
What the validator checks
Strict RFC 8259 JSON — the same rules your API and your database will apply. The things that trip people up most often:
- Trailing commas. Legal in JavaScript, illegal in JSON.
- Single quotes. JSON strings are double-quoted, always.
'name'is not a valid key. - Unquoted keys.
name:has to be"name":. - Comments. There is no comment syntax in JSON. Not
//, not/* */. - NaN and Infinity. Not representable — they come out as
nullthrough most serialisers, which is its own quiet bug.
A note on large numbers
JSON numbers have no size limit, but JavaScript parses them as doubles. Anything above2^53 − 1 loses precision silently:
JSON.parse('{"id": 9007199254740993}').id
// 9007199254740992 ← off by one, no errorIf you are handling Twitter-style snowflake IDs, database bigints or anything counted in nanoseconds, send them as strings. This tool round-trips throughJSON.parse, so it inherits the same limit — the formatted output of a 19-digit integer may differ from what you pasted in.