search

Found

info Overview

Validate a JSON instance against a Schema in draft-07, 2019-09, or 2020-12 and see each error broken out by JSON Pointer path, keyword, and message.

📘 How to Use

  1. Pick a draft (draft-07, 2019-09, or 2020-12)
  2. Paste your JSON Schema in the top textarea
  3. Paste the instance JSON in the bottom textarea
  4. Read the verdict card and error table for any violations

JSON Schema Validator

Ready
Paste a JSON Schema and an instance to run validation.

※ Covers core JSON Schema keywords (type, required, enum, const, properties, items, allOf, anyOf, oneOf, not, and so on). $ref / $defs, dependentSchemas, contains, if/then/else, and unevaluatedProperties/Items are not resolved.

Article

JSON Schema Validator | Toggle draft-07 / 2019-09 / 2020-12 inside the browser

A lightweight checker for JSON Schemas pulled from OpenAPI specs, contract tests, or config files. Switch between the three major drafts with one click and see every error broken out by JSON Pointer path, keyword, and message.

💡 About this tool

JSON Schema is the de facto way to declare what shape your JSON can take — API responses, webhook payloads, build configs, even VS Code settings.json IntelliSense. The pain in day-to-day work is rarely reading the schema; it's pinpointing which keyword a specific instance trips on. Spinning up npx ajv-cli is overkill for a one-off PR review, and IDE plugins lock you into a single draft version. This tool sits in that middle ground: paste, validate, ship.

Toggle between draft-07, 2019-09, and 2020-12 to mirror whatever your toolchain is on. The validator parses both inputs with native JSON.parse, then runs a subset implementation of the spec. Errors appear in a three-column table — instancePath (JSON Pointer), keyword, and message — so you can trace failures through deeply nested properties without scrolling through stack traces. Flip the error-collection toggle to "First only" for an early-exit mode that's handy when debugging massive schemas one violation at a time.

The covered keyword set is the core: type, required, enum, const, minLength, maxLength, pattern, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, minItems, maxItems, uniqueItems, prefixItems, items, minProperties, maxProperties, additionalProperties, patternProperties, format (subset), allOf, anyOf, oneOf, not, and boolean false schemas. What's not resolved: $ref / $defs lookups, dependentSchemas, contains, if/then/else, and unevaluatedProperties / unevaluatedItems. If your schema leans on those keywords, pipe the result through ajv or jsonschema for the final pass — treat this tool as the pre-flight sanity check, not the production gate.

🧐 Frequently Asked Questions

Q. What changes when I toggle the draft version? In 2020-12, items only takes a single schema; tuple validation moved to prefixItems. This validator implements prefixItems natively and still accepts array-style items on 2019-09 and draft-07. exclusiveMinimum / exclusiveMaximum are treated as numeric across all three drafts.

Q. How strict is the format check? email, uri, url, uuid, date, time, date-time, ipv4, ipv6, and hostname are validated with built-in regular expressions — a fast subset, not full RFC compliance. For strict UUID variant bits or leap-second-aware date-time parsing, layer ajv-formats on top in your CI step.

Q. Will schemas with $ref work? Parsing succeeds, but $ref targets are not dereferenced — constraints behind the reference simply aren't applied, so the instance may be marked valid even when the referenced schema would fail it. Use ajv or another full implementation when $ref resolution matters.

Q. The error list is overwhelming — how do I prioritize? Switch "Errors" to "First only" so the validator exits on the first violation it finds. Combined with deeply nested schemas, this is the fastest way to walk a failure tree without 200 cascading errors burying the root cause.

Q. Is there a size limit on the inputs? No hard cap, but JSON.parse runs in the main thread and uses real memory. Multi-megabyte payloads belong in your CI runner with ajv; this tool is sized for single request bodies, fixtures, and webhook samples.

Q. Can I reuse the error output elsewhere? The Copy button below the table puts a JSON array of {instancePath, schemaPath, keyword, message} records on your clipboard. Drop it straight into a GitHub Issue, PR comment, or test report.

📚 Fun Facts

JSON Schema's version history is unusual: draft-04 (2013) → draft-06 (early 2017) → draft-07 (late 2017) → draft-2019-09 → draft-2020-12. The naming flipped from sequential numbers to year-month tags around 2019, when the IETF working group emphasized that "draft" here means revision number, not "incomplete." Despite the implication, draft-07 remains the most widely deployed version because it's pinned in OpenAPI 3.0 (the 3.1 spec finally moved to 2020-12).

A surprising fraction of the modern JS ecosystem uses JSON Schema for things other than validation: react-jsonschema-form generates entire UIs from a schema, VS Code's json.schemas setting drives autocomplete and inline docs, and tools like ts-json-schema-generator round-trip TypeScript types into schemas and back. Annotation keywords (description, examples, default, deprecated) don't affect validation but become first-class UX in those tooling chains — a habit worth picking up early.