How to validate JSON with a local Draft 7 schema
Paste a JSON instance and a JSON Schema Draft 7 document, then validate in a cancellable browser Worker. The tool checks the schema against the Draft 7 meta-schema before checking your data, without coercing types or inserting defaults.
How do you do it?
- Paste JSON and a Draft 7 schema, or open the two local files; each is limited to 2 MiB.
- Select Run. A valid JSON document may still fail the schema; inspect the valid flag and error paths.
- Fix the data or schema and run again, then copy or download the report.
Check an integer age
The string "21" is not an integer. Changing it to the number 21 passes this schema. Validation never changes the input.
Input:
JSON: {"age":"21"}
Schema: {"type":"object","properties":{"age":{"type":"integer","minimum":18}},"required":["age"]}
Output:
valid: false
instancePath: #/age
keyword: typeWhen is this workflow useful?
Use schema validation to check a data contract. Use JSON Formatter for syntax alone, JSON Query to extract fields and Mock Data to create test cases. A successful validation is limited to the supplied schema and supported Draft 7 behavior.
What should you check before relying on the result?
Draft 7 only; absent $schema means Draft 7. Newer-draft keywords are rejected. Unknown extension keywords are ignored, not custom validation code. Local references must resolve within the document. Format checks follow the engine’s supported formats; they do not verify real email accounts or URLs. Schema nesting is capped at 100 levels, the report at 100 errors, and processing at 15 seconds. JavaScript number precision applies; keep large IDs as strings.
What can go wrong?
| Problem | What to try |
|---|---|
| The schema is rejected before data validation. | Its syntax, keyword values or declared draft are unsupported. Use Draft 7, check keyword types, and replace newer keywords such as prefixItems with the Draft 7 equivalent. |
| A reference cannot be resolved. | Only # references within this schema document are supported; no remote documents are fetched. Inline external definitions under definitions and reference them with #/definitions/name. |
Frequently asked questions
Do I need to upload data or sign in?
No. Processing runs in the current browser. This site serves the page and required static engine assets.
Why does the result disappear after I edit the input?
The tool clears stale output so a previous result cannot be mistaken for the new one. Run again after changing input or settings.
References
First edition: steps checked against the current tool interface, with examples and known limits.