JSON Schema Validator
Validate JSON data against a JSON Schema (drafts 4, 6, 7, 2019-09 and 2020-12) and see every error with the path into your data and into the schema.
At a glance
- Processing
- Locally in your browser, also offline once the page has been opened. Input never leaves your device.
- Drafts
- 4, 6, 7, 2019-09 and 2020-12, read from $schema
- References
- Local $ref and $id only; remote URLs are never fetched
- For agents
-
WebMCP:
json_schema_validate· Module:/core/json-schema-validator.js· Markdown · llms-full.txt
How to Use
- 01 Paste the schema Put your JSON Schema on the left. The draft is read from $schema; without it, 2020-12 applies. You can also pick a draft yourself.
- 02 Paste the data Put the JSON you want to check on the right. The result updates while you type.
- 03 Read the errors Each error names the failing value as a JSON Pointer into your data, the schema keyword and the path to it in the schema.
About this tool
JSON Schema describes what valid JSON looks like: types, required fields, value ranges, patterns. APIs, configuration files and tool definitions for AI agents use it to catch wrong data before it causes trouble.
Validation uses @cfworker/json-schema, which needs no eval or generated code. Error messages come from that library and are in English.
Frequently Asked Questions
The one named in $schema; without $schema, 2020-12. Draft 6 is checked as draft 7, which only adds keywords to it. Pick a draft manually to override $schema.
Remote schemas are never fetched, so the result never depends on another server. Copy the referenced schema into $defs and point the $ref to #/$defs/name.
Since draft 2019-09, format is an annotation unless a validator is told to check it. Turn on “Check formats” to validate date, date-time, email, uri, uuid, ipv4, ipv6 and more.
The data path is a JSON Pointer to the failing value, such as /items/2/price. The schema path leads to the keyword that failed, including every $ref it followed.
No, a JSON Schema is plain JSON. The JSON Formatter’s “Clean” mode removes comments and trailing commas for you.