JSON Schema Validator
Check JSON against a JSON Schema (draft 4, 7, 2019-09 or 2020-12) and see every problem with its location.
Runs in your browser Your input never leaves your device.
Report a problem with this tool
About this tool
Paste your JSON Schema into the Schema box and the JSON you want to check into the box below. The tool tells you if the JSON is valid and, if not, lists every problem: the path to the value (such as /address/zip), the rule that failed (type, required, minimum, pattern and so on) and a message. When one failure causes others, only the deepest reason is shown, so the list stays readable. The draft is taken from the $schema line of your schema, or you can choose draft 4, 7, 2019-09 or 2020-12 yourself; without a $schema line, 2020-12 is used. It uses the cfworker json-schema library, which does not generate code at run time, so it works under the strict security policy of this site. We ran the tool against the official JSON-Schema-Test-Suite (all required tests of drafts 4, 6, 7, 2019-09 and 2020-12): 4,703 of the 4,764 tests it could run gave the expected answer, 98.7%. The differences are in rarely used corners ($dynamicRef, property names such as __proto__, and the fact that this tool checks formats like email and ipv4 as rules, where the newest drafts treat them as hints). References to other files or web addresses are not fetched: put shared definitions inside the schema under $defs. Everything is processed in your browser and nothing is uploaded.
How to use it
- Paste the JSON Schema into the Schema box.
- Paste the JSON to check into the box below.
- Read the verdict and the list of problems.
- Fix the data (or the schema) and watch the result update.
Common problems
- It says the schema could not be used
- The schema may contain a reference ($ref) to another file or a web address, which is not fetched, or may be malformed. Put the definitions inside the schema, under $defs.
- A format such as email is checked although my draft says it is only a hint
- This tool applies formats as rules, which is usually what people want when testing data. Remove the format keyword if you do not want it enforced.
- My validator gives a different answer
- Validators differ in rarely used features, and in which draft they assume. Set the draft explicitly and compare the path and keyword of the first problem.