BackendBench
Coffee
Free tool

JSON Schema validator

Paste a schema and a JSON document and see exactly why validation fails, with the path of each error.

Errors

Checking JSON against a schema

A JSON Schema is a contract: it says which fields a document must have, what types they are and what values they may take. Validating against it catches bad requests before they reach your business logic, configuration mistakes before a deployment, and breaking changes in test fixtures. Server frameworks, API gateways, CI pipelines and editors all use it; sometimes you just want to answer the question "why is my document rejected?" with a real list of errors.

Paste a schema and a document and the validator lists each violation with the path of the failing value and the keyword that failed: /age must be <= 130, /email must match format "email", must NOT have additional properties. Fix the document (or loosen the schema) and the result updates immediately.

Common keywords

To start from an example document instead of writing a schema, use the JSON Schema generator on this site. The validator library is loaded only when you open this page, and all checking happens in your browser, so private data stays private.

Frequently asked questions

Which JSON Schema drafts are supported?

Draft 2020-12 (the default), draft 2019-09 and drafts 07 and earlier are recognised through the $schema keyword. The validator is Ajv, which is the most widely used JSON Schema library for JavaScript.

Why do I see several errors for one field?

The validator reports every failed keyword, not just the first, so a value can fail both minimum and type. Each error shows the JSON Pointer to the failing value.

Does it check formats such as email and date-time?

Yes. The common formats (email, uri, date, date-time, uuid, ipv4, ipv6, hostname) are checked using ajv-formats. By the specification formats are annotations, but most tools enforce them.

What is $ref and can I use it?

$ref points to another part of the schema, such as #/$defs/Address. Local references work. References to remote URLs are not fetched, because everything runs offline in your browser.

More tools you might need