About this tool
Separate schema compilation problems from instance validation errors and review the exact instance pointer, schema path, and keyword for every issue.
JSON Schema Validator takes a schema and a JSON document, compiles the schema with Ajv for the draft you choose, and reports every place the document breaks a rule. Draft 7, 2019-09, and 2020-12 each get their own validator, and the tool reads the $schema keyword separately so a mismatch between what the schema declares and what you selected is called out rather than silently ignored. Results come back as a table with the instance JSON Pointer, the schema path, the failing keyword, and Ajv's message. Common string formats such as email, date-time, and uri are asserted through ajv-formats. Everything runs inside a Web Worker that is discarded after each run, and you can download a JSON report that includes the metrics and errors but not your source documents.
- Uses separate Ajv validators for Draft 7, 2019-09, and 2020-12 inside a disposable, five-second Web Worker.
- Rejects non-strict JSON, duplicate keys, unsafe integers, oversized or deeply nested documents, and unresolved remote $ref values without fetching them.
- Exports a report without full input source, including metrics, status, keyword, JSON Pointer, schema path, draft evidence, and bounded errors.
How to use Schema Validator
The page opens with a sample schema and a sample instance already loaded, so try Validate schema and instance once to see what the result table looks like. Then paste your own schema into the Schema editor and your document into the Instance editor, or use the file buttons to open .json files up to 2,000,000 bytes. Pick the draft from the Validator draft dropdown. After validating, read the Schema and Instance metrics, then work through the error rows; each row names an instance pointer such as /items/3/price and the keyword that failed. If a warning says the schema declares a different draft, press Use declared draft and run again. Download JSON report saves the result once the inputs stop changing.
When this tool is useful
- Backend developers checking a hand-written API response example against the OpenAPI component schema before publishing docs.
- QA engineers reproducing a contract test failure locally by pasting the exact payload from a failed CI run.
- Data engineers confirming that a configuration file or event record follows a team schema before it enters a pipeline.
- Schema authors migrating from Draft 7 to 2020-12 who want to see which keywords behave differently under each draft.
- Technical writers confirming that every JSON snippet in a tutorial actually passes the schema the tutorial describes.
Practical tips
- Remote $ref values are never fetched, so inline referenced definitions under $defs or the compilation step fails with an unresolved reference error.
- The tool rejects duplicate object keys and integers outside the safe range. Fix those in the source rather than assuming the validator will pick a winner.
- Only 200 errors are returned. If the total reads higher, fix the earliest structural problems first, because many later errors disappear with them.
- The five-second worker timeout mostly trips on very large instances with deeply nested arrays; validate a slice of the data to locate the issue.
- Formats are asserted, not just annotated. A string that fails the date-time format is an error, which is stricter than some other validators.
Examples you can test
Load an example, compare the result with the expected output, then replace it with your own input.
Wrong type on a required field
Example input
Schema: {"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}} · Instance: {"id":"42"}Expected output
1 error. Instance pointer /id, schema path #/properties/id/type, keyword type, message must be integer.
The pointer tells you exactly which value to fix; the schema path tells you which rule produced the message.
Draft mismatch warning
Example input
Schema declares "$schema": "https://json-schema.org/draft/2020-12/schema" while the dropdown is set to Draft 7
Expected output
Validation still runs under Draft 7, with a warning banner and a Use declared draft button to rerun under 2020-12.
Keywords like prefixItems and $dynamicRef only behave correctly once the matching draft is selected, so rerun before trusting the result.
Validation checklist
- Confirm the Validator draft matches the $schema URI declared in your schema.
- Check the Errors metric total, not only the rows shown, when it exceeds 200.
- Resolve every instance pointer in the table, then validate again until zero errors remain.
- Retest a known-good document to make sure the schema is not rejecting everything.
- Download the report only after the dirty warning clears, so it reflects the current inputs.