JSON Schema Validator — Online JSON Schema Tester

🔒 Runs in your browser — nothing is sent to a server

JSON Schema validator that runs entirely in your browser. Paste a JSON Schema on the left, the data document on the right, pick a draft (2020-12, 2019-09, draft-07, draft-06 or draft-04) and the validator reports `valid` or every failing rule with a JSON Pointer to the offending field, the schema path that triggered the error, and a human-readable message. Powered by AJV, the de-facto JavaScript reference implementation. Everything runs 100% inside your browser; the schema and data never leave your device, nothing is uploaded, logged or sent to any server. External `$ref` URLs are deliberately not fetched.

External $ref URLs are not fetched (privacy). Use inline$defs for shared subschemas.

Why validate JSON against a schema in the browser

Schema validation is normally part of a server-side build or an API gateway, and the feedback loop is slow — change the contract, deploy, see the failure in a log, repeat. A live in-browser JSON Schema validator collapses that loop into seconds: paste the schema, paste a payload, click Validate, read the JSON Pointer to the broken field. It is also far safer than online schema checkers that POST your data to a server you do not control. AJV runs as plain JavaScript here, so the schema, the data and the result stay on your machine. Use it during contract negotiation between front-end and back-end teams, while reviewing OpenAPI spec changes, or to debug the exact moment a webhook payload starts failing in staging.

How AJV reports errors and how to read them

AJV walks the schema and the data in parallel and emits one `ErrorObject` per failed rule. Each error has `instancePath` (a JSON Pointer to the location in the data), `schemaPath` (an internal pointer into the schema), `keyword` (the rule that failed — `required`, `type`, `pattern`, `minLength`), `params` (rule-specific context, such as the missing key for `required`) and `message` (a human-readable explanation). The validator on this page surfaces the path and the message; reading the schema path is helpful when the same constraint appears in multiple sub-schemas, because it tells you which branch produced the failure.

Examples

Input
{"type":"object","required":["id","email"],"properties":{"id":{"type":"integer"},"email":{"type":"string","format":"email"}}}
Output
Valid against {"id": 7, "email": "ana@example.com"}
Validate JSON schema with required + type rules
Input
{"type":"object","properties":{"a":{"type":"string"}},"additionalProperties":false}
Output
Invalid: /b — must NOT have additional properties
JSON schema checker — additionalProperties violation
Input
{"type":"string","pattern":"^[A-Z]{3}-\\d{4}$"}
Output
Invalid: (root) — must match pattern "^[A-Z]{3}-\\d{4}$" (got "abc-1234")
Check json against schema — string pattern fails
Input
{"type":"array","items":{"type":"string"},"uniqueItems":true}
Output
Invalid: /1 — must NOT have duplicate items (items ## 0 and 1 are identical)
JSON schema tester — array uniqueItems

FAQ

How do I validate JSON against a schema online?

Paste your JSON Schema into the left editor and the data document into the right editor, then click Validate. The JSON Schema validator parses both, compiles the schema with AJV using the draft you selected, and either shows `Valid` or lists every error with a JSON Pointer (`/items/2/name`), the schema path that triggered it, and a plain-English message. The whole flow runs in your browser.

Which JSON Schema drafts does this checker support?

AJV 8 supports draft-06, draft-07, draft 2019-09 and draft 2020-12 — exposed as toggle buttons. 2020-12 is the current default and adds `prefixItems`, `dependentSchemas`, `unevaluatedProperties`, and the new `$dynamicRef`/`$dynamicAnchor` keywords. If your schema uses `$schema`, the validator obeys whatever you set there. Draft-04 is no longer first-class in AJV 8 — convert older schemas to draft-07 first (the differences are minimal).

How does the JSON schema validator report errors?

Each failure becomes a row with three pieces of information: the JSON Pointer to the location in the data (`/items/2/name`), the schema path that produced the rule (`#/properties/items/items/properties/name/minLength`), and the message AJV generated (`must NOT have fewer than 1 character`). All errors are collected via `allErrors: true`, so a single Validate run shows everything that is wrong, not just the first failure.

Does this JSON schema tester fetch external $ref URLs?

No. External `$ref` lookups are deliberately disabled — the tool is privacy-first and runs offline once loaded, so it never makes network requests with your schema or data. If you have a multi-file schema, inline the referenced documents into `$defs` (or `definitions` in older drafts) and reference them with internal pointers like `#/$defs/Address`.

What is the difference between draft-07 and JSON Schema 2020-12?

draft-07 (2018) is what most npm projects still ship — `properties`, `required`, `type`, `items`, `additionalProperties`, `pattern`, `format`. 2020-12 supersedes draft 2019-09 and adds `prefixItems` for tuple validation, `unevaluatedItems`/`unevaluatedProperties`, `dependentRequired`/`dependentSchemas`, and dynamic refs. If you copy a schema from a tool like FastAPI or Hyper-Schema, check the `$schema` URI before validating here.

How can I validate JSON Schema syntax itself?

Set the data editor to your schema and the schema editor to the meta-schema for the draft you target — for 2020-12 that is `https://json-schema.org/draft/2020-12/schema`. AJV ships meta-schemas for every supported draft, and the validator will tell you exactly which keyword in your schema is malformed. AJV reports the same errors at compile time when you click Validate, so most mistakes are caught implicitly.

Glossary

JSON Schema

JSON Schema is a vocabulary for describing the shape of JSON documents — types, required keys, value constraints, format hints (`email`, `uri`, `date-time`), allowed sub-schemas. A schema is itself a JSON document, which means a JSON Schema validator can validate schemas against the meta-schema of the draft. The JSON Schema specification is maintained by the json-schema.org community across drafts 06, 07, 2019-09 and 2020-12 (draft-04 is the historical baseline most modern engines no longer ship).

AJV

AJV is the most widely used JSON Schema validator for JavaScript. It compiles a schema into a fast validation function ahead of time, supports every recent draft, exposes detailed error objects, and integrates the format vocabulary via `ajv-formats`. The validator on this page uses AJV directly in the browser via dynamic imports — only the draft you pick is loaded, keeping the bundle small.

JSON Pointer

A JSON Pointer is a slash-separated path that identifies a single value inside a JSON document — `/items/2/name` points at the `name` property of the third element in `items`. AJV reports the location of every validation failure as a JSON Pointer in the `instancePath` field, so the JSON schema validator can highlight exactly which field broke a rule.

$ref and $defs

`$ref` is a JSON Schema keyword that inlines another schema by URI or by JSON Pointer. Internal pointers like `#/$defs/Address` (or `#/definitions/Address` in pre-2019 drafts) let you reuse sub-schemas without duplicating them. External `$ref` URLs would require the validator to make network calls — this tool blocks them on purpose, so paste the referenced schema into `$defs` and validate fully offline.

Draft 2020-12

The current published JSON Schema draft, also known as `draft/2020-12`. Compared with draft-07 it splits validation into multiple vocabularies, adds `prefixItems` (tuple validation), `unevaluatedItems` and `unevaluatedProperties`, refines `dependentRequired`/`dependentSchemas`, and introduces dynamic anchors. New schemas should target 2020-12 unless a tool downstream is locked to an earlier draft.

Related tools