Skip to content

JSON Formatter & Validator

Paste JSON to validate it against the RFC 8259 spec, see the exact line and column of any syntax error, and get a clean pretty-printed or minified copy. Your JSON never leaves your browser.

JSON

Processed locally. Your JSON never leaves your browser.

Formatted output

Paste some JSON to validate and format it.

How validation works

Your JSON is parsed against the RFC 8259 grammar. Anything that breaks the grammar — a missing comma, an unquoted key, a trailing comma — is a hard error with the exact line and column. Two things are flagged as warnings instead, because they're valid JSON but easy to get wrong by accident: duplicate object keys, and numbers outside JavaScript's safely representable integer range. Valid input can always be pretty-printed with your chosen indent, or minified to a single line.

Common questions

What does the "duplicate key" warning mean?

It means the same key appears more than once in an object — that's valid JSON syntax, but per the spec only the last value for that key is kept, and the earlier one is silently discarded. This is flagged as a warning, not an error, because it won't stop your JSON from parsing — but it's almost always a mistake worth checking.

What does "unsafe precision" mean for a number?

JSON numbers are commonly parsed into JavaScript's standard floating-point type, which can only represent integers exactly up to ±2^53−1. A number outside that range (a large ID or timestamp, for example) may silently lose precision when read. If exact precision matters, represent that value as a string instead of a bare number.

Does formatting or minifying change my data?

No — both only change whitespace and structure (indentation, or removing it entirely). Keys, values, and their types are never modified. The one exception is the duplicate-key case above, which is a property of the JSON itself, not something this tool changes.