Skip to content

JSON Schema Validator

Validates a document against a JSON Schema and reports each failure with its instance path.

Validates a JSON document against a JSON Schema, draft 2020-12, entirely in the browser. It passes all 1,299 required tests of the official JSON-Schema-Test-Suite, and every failure is reported with the instance location and the keyword that produced it.

🔒 Runs entirely in your browserjson-schemavalidatejson

Schema (draft 2020-12)

Data to validate

Result

Verdict

Invalid

Failures

3

Instance locationKeywordProblem
/portmaximummust be at most 65535
/tagsuniqueItemsitems 0 and 1 are equal
/debugfalseis never valid here (schema is false)
Validation runs entirely in this tab against JSON Schema draft 2020-12, and passes all 1,299 required tests of the official JSON-Schema-Test-Suite. $ref resolves within the schema, the pasted additional documents and the bundled 2020-12 meta-schemas — remote references are refused rather than fetched, so results never depend on the network. format is reported as an annotation, not enforced, which is the 2020-12 default.

How to use it

  1. Paste the schema and the data

    Both boxes revalidate as you type. A syntax error in either is reported separately, so you know which side is broken.

  2. Add referenced documents if you have `$ref`s

    Turn on Additional schemas and paste them — one document or an array of them, each with its `$id`. Nothing is fetched over the network, so a schema split across files still validates here.

  3. Read the failure table

    Each row gives the instance path, the keyword that failed and what it wanted. Copy the whole set as JSON if you are pasting it into an issue.

Common questions

Why is my `"format": "email"` not enforced?

Because 2020-12 makes `format` an annotation by default — a validator is allowed to report it and not to check it, and most do exactly that. If you need it enforced, use `pattern`, or a validator configured with the format-assertion vocabulary.

A remote `$ref` failed to resolve.

Remote references are refused, not fetched. A validator that reaches out to the network gives results that depend on DNS and someone else’s uptime, and it tells that someone which schemas you are validating. Paste the referenced document into the additional-schemas box instead.

Which drafts are supported?

2020-12. A Draft-07 schema often validates anyway — most keywords are unchanged — but `definitions` is not `$defs`, `items` means something different for tuples, and `$recursiveRef` is gone. Check the `$schema` line before assuming.

Why so many errors for one wrong field?

Because a failure inside `anyOf`, `oneOf` or `allOf` reports every branch that failed — that is what the specification says an output unit contains. The first row is usually the one you want; the rest explain why no alternative matched either.

Feed it from

Next

These accept what this tool produces, so the result can go straight in.