A JSON Schema describes the shape a document is supposed to have — which keys exist, what types their values take, which are required, what ranges and patterns are allowed. This page checks a document against one and reports every place the two disagree, without either leaving your browser.
Reading a failure
Each failure carries two locations, and they answer different questions:
| Points into | Example | Answers | |
|---|---|---|---|
| Value path | your document | items[0].price | what is wrong |
| Rule path | your schema | /properties/items/items/properties/price/type | which rule says so |
The value path is written the way you would reach the value in code, so items[0].price can be
read straight down the document. Keys that are not plain identifiers are quoted — a key containing
a dot appears as ["a.b"] rather than silently reading as two levels.
The rule path is a JSON pointer into your schema, which is how you find the keyword to change when it is the schema, not the document, that is wrong.
The draft is taken from your schema
The validator reads the $schema keyword and applies that draft's rules. Draft 4, 6, 7, 2019-09
and 2020-12 are all supported, which matters because the drafts genuinely differ:
exclusiveMinimumwas a boolean modifier in draft 4 and became a number of its own from draft 6.itemsas an array of schemas becameprefixItemsin 2020-12.definitionsbecame$defs.
A schema with no $schema keyword is validated as 2020-12.
$schema line first. Two validators disagreeing on the same document usually means they picked different drafts, not that one of them is wrong.External references are refused on purpose
A $ref pointing at another file or a URL will not resolve. That is not an unfinished feature: the
only way to resolve one is to fetch it, and fetching would break the promise this page makes. A
validator that downloads URLs out of your schema is one that can be made to reveal which schemas
you work with, and to whom.
References inside the schema work normally. Move what you need under $defs and point at it with
a local pointer:
{
"$defs": { "money": { "type": "number", "minimum": 0 } },
"type": "object",
"properties": { "price": { "$ref": "#/$defs/money" } }
}
Numbers keep their exact value
Validation runs on each number's source text rather than on a converted double. A 30-digit integer
therefore still validates as an integer, and still compares correctly against minimum,
maximum and multipleOf. This is a real difference: in a validator that parses to a double
first, a large identifier is quietly damaged before any rule is applied, and the report describes
a value you never sent.
Common failures and what they mean
- want string, but got number — a type mismatch, usually a numeric field that arrived quoted or a quoted field that arrived numeric. Check what produced the document, not the schema.
- missing properties — a
requiredkey is absent. If it is legitimately optional, the schema is what needs fixing. - must not have additional properties — the schema sets
additionalProperties: falseand the document carries a key it does not declare. Common after an API adds a field. - does not match pattern — a
patternorformatrejected the value. Regular expressions in schemas are unanchored unless you anchor them, so a partial match counts as a match.
Limits
Ten megabytes each for the schema and the document — a ceiling on what a browser tab can hold comfortably, not on what the validator can do.