JSON Schema Validator
Check a JSON document against a JSON Schema and get a precise, per-error report — instancePath, keyword and all.
Your data stays on your device
JSON document
- characters
- 0
- lines
- 0
- size
- 0 B
JSON Schema
- characters
- 0
- lines
- 0
- size
- 0 B
About this tool
Syntax validation tells you whether JSON is well-formed; schema validation tells you whether it means the right thing. A JSON Schema declares the required properties, types, formats, ranges and shapes a document must satisfy, and this tool checks a document against one.
Validation is powered by Ajv, the most widely used JSON Schema engine, running entirely in your browser. It targets Draft 2020-12 and validates Draft-07 schemas in a lenient mode, so real-world schemas compile instead of being rejected for an unfamiliar keyword.
How to use this tool
- Paste your JSON document into the left editor.
- Paste the JSON Schema into the right editor, or load the sample to see the format.
- Choose whether to report only the first error or all of them.
- Press Validate and work through each error using its instancePath and message.
Key features
- Ajv-powered validation for Draft 2020-12 and Draft-07
- Per-error instancePath, schemaPath, keyword, message and params
- Report the first error only, or every error at once
- Format keywords (email, date, uri, …) via ajv-formats
- Separate, precise syntax errors when either input is not valid JSON
Example
Input — JSON + Schema
{ "id": 1 } // schema requires "name"Output — Report
instancePath: (root)
keyword: required
message: must have required property 'name'Good to know
- Both the document and the schema must themselves be valid JSON first; a syntax error in either is reported before schema checks run.
- Strict mode is disabled so unusual schemas compile; genuinely invalid schemas are reported as compile errors.
Frequently asked questions
Which JSON Schema drafts are supported?
Ajv here is configured for Draft 2020-12, and it also validates Draft-07 schemas in a lenient mode. Very old drafts (4/6) may need adjustment.
What do instancePath and schemaPath mean?
instancePath points to the location in your document that failed; schemaPath points to the rule in the schema that rejected it. Together they tell you exactly what to fix and why.
Is my data or schema uploaded?
No. Compilation and validation run entirely in your browser tab.
Your data stays on your device
Your data is processed locally in your browser and is not uploaded to our server. This page keeps working after you go offline, because there is nothing to send.