JSON Schema Validator

Validate JSON against a JSON Schema and list violations.

The JSON Schema Validator checks a JSON document against a JSON Schema and lists every violation with the path of the failing value. Paste the schema in the left pane and the data in the right one, and the result updates after a short pause. It is useful for designing schemas and debugging API payloads.

What is JSON Schema?

JSON Schema is a vocabulary for describing the structure of JSON data and validating it. A schema is itself a JSON document that uses keywords such as type, properties, required, items, minimum, maxLength, pattern and enum to state what is allowed. A validator checks an instance, which is the data, against the schema and reports each place where a rule fails, usually with a path such as /items/0/price. Schemas are published in drafts, and the declared $schema identifies the draft. This tool uses the Ajv library with all errors collected. It applies draft-07 rules by default and switches to draft 2020-12 when the schema's $schema value contains 2020-12. Format keywords such as email or date-time are not checked: string formats are not validated. Validation reports whether data is acceptable and never changes it.

How to use JSON Schema Validator

  1. Enter the schema Paste the JSON Schema in the JSON Schema pane.
  2. Enter the data Paste the JSON document in the JSON data pane. Nothing is checked until both panes have content.
  3. Read the result A green message says the data is valid and names the draft. Otherwise a card shows the number of violations.
  4. Follow the paths Each violation shows the path of the failing value, the message and the keyword in brackets. A failure on the whole document shows (root).
  5. Adjust and retry Change the schema or the data and the result updates.

Frequently asked questions

Which JSON Schema drafts are supported?

Draft-07 by default. If the schema's $schema contains 2020-12, the 2020-12 rules are used. Other drafts are not selected separately.

Are formats such as email or date-time enforced?

No. This tool does not validate string formats, so a format keyword never causes a violation.

What is the path shown for each error?

A JSON Pointer to the failing value, for example /items/0/price. The whole document is shown as (root).

Does validation modify my data?

No. It only reports whether the data satisfies the schema.

Can I use $ref?

Yes for references inside the same schema, such as #/definitions/name or #/$defs/name. Remote schemas are not fetched.

Is my data uploaded?

No. Both the schema and the data stay in the page and are not sent anywhere.