JSON Schema Validator checks a JSON document against a JSON Schema and lists every rule it breaks, each with the exact field involved. It reports all the problems at once rather than stopping at the first, and supports drafts 2020-12, 2019-09, 7 and 4. Both the schema and the data stay in your browser.
How to validate JSON against a schema
- Paste your schema on the left, and the JSON you want to check on the right.
- Pick the draft your schema was written for. If it has an
$schemaline, that names it. - Problems appear below, each with the field path, what is wrong and which rule it broke.
Reading the results
Each problem names the place in your data rather than in the schema, so books[1].price means the second item of the books array. The keyword on the right, such as minLength orrequired, tells you which rule was not met, which is what to look for in the schema.
Rules people trip over
requiredis a list on the object, not a flag on each property. It names which properties must be present.additionalProperties: falserejects any field you did not declare, which is strict but catches typos in field names.type: "integer"rejects 1.5, while"number"accepts it.- Formats like
emailanddate-timeare checked here, but some validators treat them as advisory only.
References to other files
A $ref pointing at another part of the same schema works normally. One pointing at another website is not downloaded, because this page never contacts other servers. To check a schema that is split across files, paste the pieces into one document first.
Related tools
If the JSON will not even parse, the JSON Validator explains where it is broken. To pull specific values out of a document, use the JSONPath Tester, and to turn an example response into checkable types for your code, useJSON to Zod Schema.
Frequently asked questions
What is JSON Schema?
A way of writing down the shape your JSON should have: which fields are required, what type each one is, and what values are allowed. APIs use it to describe and check the data they accept.
Which draft should I choose?
2020-12 is the current one and the right default for anything new. Older schemas often say draft-07, and some tools still use draft-04. If your schema has an "$schema" line, it names the draft it was written for.
Why does it show the field path?
So you can find the problem in a large document. A path like books[1].price means the second item of the books array, and its price field, rather than leaving you to count through the JSON yourself.
Does it fetch schemas referenced by URL?
No. A $ref pointing at another website is not downloaded, because this page never contacts other servers. References within the same schema work normally.
Is my data uploaded?
No. Both the schema and the JSON are checked in your browser, so real payloads stay on your device.
Last updated