Skip to content

Validate JSON syntax and structure

Check that a document is valid JSON, find duplicate keys and see the exact position of the first syntax error.

Try it locally78 bytes · nothing leaves this page

Syntax and semantics

Syntax validation is separate from schema validation. The syntax checker uses a purpose-built parser with precise locations. Schema validation supports Draft 7, 2019-09 and 2020-12 through AJV, with errors mapped back to instance paths.

Duplicate keys

Standard JSON allows duplicate keys syntactically, but most parsers silently keep the last one. The validator lists every duplicate with its line so you can decide what the producer should do.

Questions

Does a valid result guarantee my API contract?

No. Syntax validation only proves the document is well-formed JSON. Use the schema validator with your contract for structural guarantees.

Why does my valid JSON5 file fail?

JSON5 extends JSON with comments, single quotes and trailing commas. The studio detects these extensions and labels the document instead of pretending they are standard JSON.

Go further in the studio

This page is intentionally a single-purpose tool. The full studio adds synchronized views, profiling, data-quality rules, schema comparison, three-way merge, transformation pipelines, timelines and local persistence. Open it with the same document and continue where this page stops.

Open JSON Forge Studio →