JSON Schema Validator
Validate JSON data against JSON Schema with clear errors and draft support.
Validation result
Enter JSON schema and instance to validate
Checks JSON data against a JSON Schema and lists every rule it breaks, with the path to the failing value. It supports drafts 06, 07, 2019-09 and 2020-12, and runs in your browser.
How to use it
Paste the schema into JSON Schema and the data into JSON instance. The result updates as you type: a confirmation with the draft used, or a table of errors with the path, the rule and a message; the lines at fault are highlighted in the data. A syntax error shows under its field, with its line and column, and must be fixed first.
- Schema draft — Auto-detect reads the
$schemaURL and falls back to draft 07. A schema that names draft 04 or 03 is reported as unsupported. - Fail on additional properties — off by default, as the JSON Schema standard allows extra keys. On, any schema that lists
propertieswithout saying otherwise rejects keys it does not list, as if it declared"additionalProperties": false. Each schema underallOfthen rejects the keys the others list, so data combining them fails. - Strict tuple validation — reports tuple schemas that do not fix the array's length.
How validation works
Validation uses Ajv, a widely used JSON Schema validator, and reports all errors rather than stopping at the first. Formats such as email, date, date-time, uri and uuid are checked.
Unknown keywords and ambiguous schemas are listed as warnings below the result, and validation still runs: typos like requried show up rather than silently doing nothing, while annotations such as example or OpenAPI's nullable do not block the check.
Examples
Four rules broken at once
- Schema
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "required": [ "name", "email" ], "properties": { "name": { "type": "string", "minLength": 1 }, "email": { "type": "string", "format": "email" }, "age": { "type": "integer", "minimum": 0 } }, "additionalProperties": false }- Data
- {"name":"","email":"anna@","age":-3,"role":"admin"}
- Errors
(additionalProperties): must NOT have additional properties /name (minLength): must NOT have fewer than 1 characters /email (format): must match format "email" /age (minimum): must be >= 0
See also
- JSON Formatter & Minifier — to find syntax errors and format the JSON first.
- CSV to JSON Converter — to turn spreadsheet data into JSON to validate.