JSON Schema Validator — validate JSON against a schema online
Paste a JSON document and a JSON Schema and see instantly whether it is valid — with the exact JSON Pointer path and a plain-English reason for every error. Supports drafts 2020-12, 2019-09 and draft-07. No signup, nothing uploaded, works offline.
How it works
The validator runs five deterministic steps in your browser. No data is sent to a server, and the engine uses no eval, so it is safe under a strict Content-Security-Policy.
- Parse both inputs. The document and the schema each go through
JSON.parse. If either is not valid JSON per the RFC 8259 grammar, the tool shows the parser message and the line and column of the syntax error, and stops before any schema rules run. - Resolve the draft. If the schema declares a
$schemakeyword — for examplehttps://json-schema.org/draft/2020-12/schema— that draft is used and the selector locks to it. Otherwise the draft you pick applies. The choice matters: keyword availability and semantics differ between drafts (for instanceprefixItemsexists in 2020-12 but not draft-07). - Validate. The parsed document, schema and draft are fed to a dependency-free validator that evaluates each assertion keyword —
type,required,enum,minimum,maxLength,pattern,format,oneOf,additionalPropertiesand the rest — per the JSON Schema Validation vocabulary. - Collapse to the real failure.The raw engine output includes structural wrappers such as “property X does not match schema.” Those are folded away so each row points at the leaf assertion that actually failed. Combinators like
oneOfkeep their summary message instead of the noisier per-branch errors. - Report. An empty error list means Valid. Otherwise you get an Invalidbadge, a count such as “3 errors in 2 locations,” and a table pairing each RFC 6901 pointer with a sentence like
/age must be ≥ 18 (minimum). Turn on “Stop at first error” to short-circuit at the first failure instead of collecting all of them.
The engine passes the official JSON-Schema-Test-Suite for every supported draft. As an extra guard, 6 hand-computed worked examples are re-checked against their expected error lists on each build, so the error output stays reproducible. Supported drafts:
- Draft 2020-12 — Current draft. Uses prefixItems for tuples; items applies to all remaining items.
- Draft 2019-09 — Introduced $defs, dependentRequired, and unevaluatedProperties.
- Draft-07 — Widely deployed. Tuple validation uses an array-valued items; supports if/then/else.
Worked examples
Frequently asked questions
Sources & references
- JSON Schema — Core specification (draft 2020-12)
- JSON Schema — Validation vocabulary (draft 2020-12)
- JSON Schema — specification links (draft-07 and 2019-09)
- RFC 6901 — JSON Pointer (error location syntax)
- RFC 8259 — the JSON Data Interchange Format (syntax parsing)
- JSON-Schema-Test-Suite — official conformance suite
Keyword semantics and error wording were last cross-checked against the JSON Schema specifications on 2026-07-05. The validator is reviewed whenever a new draft is published.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want to suggest an improvement?
Email me at [email protected] — most fixes ship within 24 hours.