Skip to content

JSON Schema Validator — Draft 2020-12, 2019-09 & 07

Validate JSON against a JSON Schema online. Live errors with instance and schema paths, click to jump to the value. Drafts 2020-12, 2019-09 and 07. Private.

Draft
Schemaschema.json
Datadata.json

Results

The schema cannot be used

Checking…

Runs in your browser with @cfworker/json-schema. No $ref is fetched and nothing is uploaded.

How to use

  1. Paste your JSON Schema on the left and the JSON document to check next to it, or keep the sample order.
  2. Results update as you type. Each error shows where it is in the data, which schema keyword failed and why.
  3. Click an error to select the value in the data editor, press F8 to step through errors, and fix them until the result turns green.

Example

{ "type": "object", "required": ["id"], "properties": { "id": { "type": "integer" } } }

Details and limitations

Validation runs in your browser with an interpreting validator (@cfworker/json-schema), so neither the schema nor the data is uploaded. Remote $ref URLs are never fetched; they are listed as unresolved and treated as allowing anything.

The draft comes from $schema unless you pick one. format is checked as an assertion (email, date-time, uri and others). JSON numbers are read as 64-bit floats, so integers beyond 2^53 lose precision and are flagged.

FAQ

Which JSON Schema drafts are supported?

Draft 2020-12, 2019-09, draft-07 (also used for draft-06) and draft-04. Auto reads the $schema keyword and falls back to 2020-12. $dynamicRef from 2020-12 is not supported and is reported when used.

Why is my $ref reported as unresolved?

Only references inside the schema you pasted can be resolved, such as #/$defs/address or an $id or $anchor defined in it. Paste referenced schemas into $defs to check them; nothing is downloaded.

Is my data sent anywhere?

No. Parsing and validation happen on this page. You can disconnect from the network after it loads and keep validating.

Format references

Tool page updated: