JSON Schema Validator

Validate JSON data against a JSON Schema (draft 2020-12, 2019-09 or 07) with Ajv and format checks. Every error shows the instance path. Runs in your browser.

Runs entirely in your browser. Your data is never uploaded.

Related Tools

View All

What is JSON Schema Validator?

The JSON Schema Validator checks JSON data against a JSON Schema and lists all violations – missing required properties, wrong types, out-of-range numbers, invalid formats, extra properties – each with the JSON Pointer of the offending value. Drafts 2020-12, 2019-09 and 07 are supported.

How to use JSON Schema Validator

  1. Paste the data into JSON data and the schema into JSON Schema (or click Load sample on each).
  2. Leave Schema version on auto-detect, or choose a draft.
  3. Read the result: a success message, or the list of errors with their instance paths.
  4. Fix the data (or schema) and the result updates automatically.

Example

Input
Data: {"age":-1,"email":"x"}
Schema: {"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","required":["name"],"properties":{"age":{"type":"integer","minimum":0},"email":{"type":"string","format":"email"}}}
Output
Validation errors: 3 (draft 2020-12)
(root) Missing required property "name"
/age Must be ≥ 0
/email Must be a valid "email"

When to use JSON Schema Validator

Use it to test API payloads, config files or schemas you are writing. Draft-04 and older schemas are not supported (Ajv 8 dropped them). Remote $ref URLs are not downloaded; schemas must be self-contained (local $ref to #/$defs/... works).

How JSON Schema Validator works

Validation uses Ajv 8, a widely used JSON Schema implementation, with allErrors enabled so every violation is reported, and ajv-formats for format keywords such as email, date-time, uri and uuid. The draft is detected from the schema's $schema URL (2020-12, 2019-09, otherwise draft-07) or chosen manually. Strict mode is off, so unknown keywords like example are ignored rather than rejected. Common error types are shown with translated messages; others use Ajv's message.

Common Use Cases

  • Checking an API request body against its OpenAPI-derived schema
  • Debugging why a config file is rejected
  • Developing and testing a new JSON Schema
  • Validating test fixtures

Security Note

Everything runs locally in your browser; the code you paste is not uploaded.

FAQs

Which drafts are supported?

2020-12, 2019-09 and draft-07 (draft-06 schemas usually work as draft-07). Draft-04 is not supported.

Are formats like email checked?

Yes, via ajv-formats.

Can it load remote $ref schemas?

No, only references inside the same schema.

Why does it show several errors at once?

All errors are collected so you can fix everything in one pass.

Good next steps

Explore more categories