Developer tools · Validators
JSON Schema validator.
Paste a JSON Schema and a JSON document to check the document against the schema. Draft-07, 2019-09 and 2020-12 are detected from $schema, and every error is listed with its JSON Pointer path. Nothing leaves your browser. To check JSON syntax only, use the JSON validator.
Input
Result
Paste a schema and a document, then press Validate.
How the check works
The page loads Ajv 8.12.0 and ajv-formats 3.0.1 from jsDelivr (pinned versions) the first time you press Validate, then runs everything locally. The dialect comes from the schema's $schema: http://json-schema.org/draft-07/schema#, https://json-schema.org/draft/2019-09/schema or https://json-schema.org/draft/2020-12/schema. Other values, such as draft-04 or draft-06, are rejected. The schema is first checked against its own meta-schema, then the document is checked with all-errors mode on, so you see every problem at once instead of only the first.
Reading the result
Each row gives the instance path, a JSON Pointer (RFC 6901) into your document where the problem sits (an empty path is the whole document; ~0 stands for ~ and ~1 for / inside a key); the failed keyword; what the schema expected; and what was received. The small line under the keyword is the path inside the schema.
Limits you should know
- No network. A
$refto another file or URL is not fetched. It fails with an unresolved-reference error. Local references such as#/$defs/namework, as do$id-based references inside the same schema. - Formats. Only the
formatnames that ajv-formats defines are checked, and the result lists anyformatin your schema that was not checked. Note thatpasswordandbinaryaccept any string. The specification treatsformatas an annotation by default in 2019-09 and 2020-12; Ajv asserts it, so this tool does too. - Unknown keywords are ignored rather than rejected, so a misspelled keyword does not raise an error. Check the spelling yourself if a rule does not seem to apply.
- Numbers are parsed by the browser's
JSON.parse, so integers beyond 253 lose precision before validation.
Sources
Links last checked 2026-10-26. JSON Schema specification (dialects and keywords); RFC 6901, JSON Pointer; Ajv error objects.
Worked example
The Load example button fills in a 2020-12 schema that requires name and email, wants name of at least 2 characters, age as an integer of 0 or more, tags as unique strings, and forbids other properties. The document is {"name":"A","email":"not-an-email","age":-3,"tags":["x","x",4],"role":"admin"}. With all-errors mode on, Ajv 8.12.0 reports 6 problems at once:
| Instance path | Keyword | Expected | Received |
|---|---|---|---|
(whole document) | additionalProperties | no additional properties | extra property "role" |
/name | minLength | length >= 2 characters | length 1 "A" |
/email | format | format "email" | string "not-an-email" |
/age | minimum | number >= 0 | integer -3 |
/tags/2 | type | type string | integer |
/tags | uniqueItems | unique items | items 1 and 0 are identical |
Fix the five values and remove role, and the document passes.
Common mix-ups
-
Often assumedPutting "format": "email" in a schema makes validation reject text that is not an email address.
What the source saysIn the 2020-12 vocabulary, format is collected as an annotation, and checking it is optional: implementations MAY also assert it, and the Format-Assertion vocabulary is OPTIONAL to support. A valid result may still carry a malformed email. [1]
-
Often assumedA field listed under properties must be present in the data.
What the source saysPresence is the job of the separate required keyword. Section 6.5.3 says an object is valid if every name in the required array is a property of the instance, and omitting required behaves like an empty array. [1]
Checked against these sources on .
Frequently asked questions
What is the difference between this and a JSON validator?
A JSON validator only checks that the text is well-formed JSON. A JSON Schema validator checks that well-formed JSON has the right shape: required properties, types, ranges, patterns and so on, as described by a schema.
Which JSON Schema drafts are supported?
Draft-07, 2019-09 and 2020-12, chosen from $schema. With no $schema, 2020-12 is assumed. Draft-04 and draft-06 are not supported.
Why did my $ref fail to resolve?
The tool never downloads schemas. References to a remote URL or file cannot be resolved; paste the referenced schema into $defs (or definitions in draft-07) and point at it with a local #/... reference.
Is my data uploaded anywhere?
No. Your schema and document are validated in your browser. The only network request is the one-time download of the Ajv library files.
Result depends on the Ajv implementation
A pass means Ajv 8.12.0 found no violation of the schema as loaded here, with the limits above. Other validators may differ on edge cases, and a passing result does not check anything the schema does not say.