DevTools Hub

Search tools

Search for a developer tool

JSON

JSON Schema Validator

Validate JSON data against a JSON Schema (Draft-07 or 2020-12), with every failing rule and its path.

Part of the JSON Toolkit
3 errors
  • (root)
    must NOT have additional properties
  • /age
    must be >= 0
  • /email
    must match format "email"

What this checks

Paste a JSON Schema and a JSON document, and the document is validated against it — types, required fields, minimum/maximum, additionalProperties, string format (email, date-time, URI, and similar), and the rest of the keywords JSON Schema defines. Every failing rule is reported with the exact path inside the document (/age, /items/2/name, and so on), not just the first one.

This is different from JSON Validator, which only checks that a document is syntactically valid JSON — it has no concept of what shape the data is supposed to have. Schema validation checks the shape; syntax validation checks that it parses at all.

Draft-07 vs. 2020-12

Pick whichever draft your schema was written against — check its $schema field if it has one. Draft-07 is still the most common in the wild (npm's package.json schema, most VS Code settings schemas, and a large share of published API schemas). 2020-12 is the current spec version, with a few keyword differences (prefixItems instead of tuple-style items arrays, among others). If a schema validates unexpectedly under one draft, try the other.

FAQ

Why does it say the schema itself is invalid?

The schema is checked against the JSON Schema meta-schema before it's used — a typo like "type": "strnig" or a keyword that doesn't exist under the selected draft gets caught here, before it ever gets a chance to validate your data.

Does this validate formats like email and date-time strictly?

Yes — format validation is included (via ajv-formats), which the JSON Schema spec itself leaves optional. Most real-world validators enable it, so this does too by default.

Try it yourself

For syntax-only validation and formatting, see JSON Validator and JSON Formatter.

Related tools