JSON Schema Validator
Check JSON against a JSON Schema (draft-04 to 2020-12) and see each problem at its path, with the rule it broke.
JSON Schema
Data to check
Result
Paste a schema and the data to check. The result updates as you edit either one.
Runs in your browser — nothing you enter leaves this device.
About this tool
What it does
The validator checks a JSON document against a JSON Schema and tells you whether it conforms — and if not, exactly what is wrong and where. Each problem names the place in the data, such as tags[1] or (root), what is wrong with it in plain words, and the rule in the schema that it broke. It understands draft-04, draft-07 (which also covers draft-06), 2019-09 and 2020-12, and picks the right one from the schema’s $schema line. Use it to check an API response against its contract, a config file against its schema, or a schema you are writing against the examples it is meant to accept.
How to use it
- Paste the schema on the left and the data to check on the right, or press “Try an example” to see a document with five problems.
- Read the result below. Valid data says so; invalid data lists each problem with its path, message and schema rule.
- If the schema has no $schema line, 2020-12 rules are used. Choose another draft from the Draft menu when you know the schema was written for one.
- Edit either side and the result updates.
Limits and your data
- $ref works within the schema you paste, including $defs and definitions. A $ref to a URL is not fetched; paste the referenced definitions into $defs instead. The error message says which reference could not be resolved.
- Formats are checked: date, time, date-time, duration, email, hostname, ipv4, ipv6, uri, uri-reference, uri-template, url, uuid, regex, json-pointer and relative-json-pointer. The 2020-12 standard makes format checks optional; most validators apply them, and this one does.
- When a value breaks a rule deep inside a schema, only the most specific failure is listed — “tags[1] should be a string” rather than the same failure repeated at tags and at the root.
- Each side can be up to 5 MB.
- This checks data against a schema. It does not check that a schema is itself well written, beyond whether it can be used.
- The schema and the data are checked in your browser. Nothing is uploaded, and the tool never fetches anything — including schemas referred to by URL.
Questions
Which draft should I choose?
Leave it on “From $schema”. A schema that starts with a $schema line says which draft it uses. If yours has none and was written for an older tool, draft-07 is the most common choice.
Why does it say a property is not allowed?
The schema sets additionalProperties to false, so any property it does not list is rejected. Either the data has a misspelt or extra field, or the schema is missing a property it should allow.
Is this the same as ajv?
It follows the same JSON Schema standards but uses a different library, one that interprets the schema directly rather than generating code — which is what lets it run inside this site’s security policy. On unusual schemas the two can word their errors differently.
Can I validate against an OpenAPI schema?
Yes, if you paste the component’s schema itself. OpenAPI 3.1 schemas are 2020-12 JSON Schema; OpenAPI 3.0 uses a close variant that draft-04 or draft-07 handles for most schemas.