What is JSON Schema Validator?
A JSON Schema Validator is a tool that checks whether a JSON document conforms to a predefined schema. The schema defines the expected structure: which properties are required, what data types they should be (string, number, boolean, array, object), value constraints (minimum, maximum, pattern, enum), and nested object shapes. Unlike JSON syntax validation which only checks if the JSON is well-formed, schema validation verifies that the data meets your specific contract requirements.
JSON Schema is the industry standard for API contract validation, configuration file verification, and form data validation. OpenAPI 3.1 uses JSON Schema Draft 2020-12 natively. This tool uses Ajv (Another JSON Schema Validator) — the fastest and most widely-used JSON Schema validator in JavaScript, used by millions of projects including webpack and ESLint.
Why AI Cannot Validate JSON Against Schema
Large Language Models, such as ChatGPT, Claude, and Gemini, are not reliable for validating JSON data against a schema. The issue is that these models can produce false positives, where they claim your data is valid even if it violates schema rules. On the other hand, they can also report errors that do not exist, known as false negatives.
Generating correct JSON Pointer paths, like /users/0/email, is a problem for these models. They tend to invent paths that do not match the RFC 6901 standard. This is particularly troublesome for deeply nested schemas that use $ref, allOf, or oneOf, which require recursive tree traversal. Text prediction models are not capable of executing this type of traversal correctly.
If you ask the same question twice, you are likely to get different answers. This lack of consistency is a concern. Additionally, when you paste proprietary API contracts into ChatGPT or Claude, your data is sent to third-party servers.
Our validator is deterministic, meaning it produces the same output every time for a given input. It runs on our server with your data processed in memory and never stored, so you can be sure your data is not being sent elsewhere. This results in bit-identical results every time, guaranteeing consistent and reliable validation.
How to Use
- Paste your JSON data into the left textarea
- Paste your JSON Schema into the right textarea
- Select the schema draft version (or leave on Auto-detect)
- Click Validate — results appear instantly
- If errors are found, each shows the JSON Pointer path, the failing keyword, and a human-readable message
- Click Copy Errors to share the error report
Supported Schema Drafts
- Draft 2020-12 (default for new projects) — used by OpenAPI 3.1, uses
$defs,prefixItems,$dynamicRef - Draft 2019-09 — transitional version between Draft-07 and 2020-12
- Draft-07 (most common) — used by Helm charts, VS Code settings, older Ajv configs, OpenAPI 3.0
When set to Auto-detect, the validator reads the $schema field from your schema. If absent, it falls back to Draft-07 for maximum compatibility.
Common Errors & Solutions
data/email — required — must have required property 'email'
Fix: Add the missing property to your JSON data
data/age — type — must be string, got number
Fix: Ensure the value matches the type declared in the schema
data/quantity — minimum — must be >= 0, got -5
Fix: Adjust the value to fall within the schema's constraints
data/email — pattern — must match pattern "^\\S+@\\S+\\.\\S+$"
Fix: Ensure the value satisfies the regex pattern defined in the schema
Frequently Asked Questions
What drafts of JSON Schema are supported?
Draft-07, Draft 2019-09, and Draft 2020-12. The validator auto-detects the draft from your schema's $schema field, or you can manually select one. For new projects in 2026, use Draft 2020-12 — it is what OpenAPI 3.1 uses natively.
Is my data sent to any server?
Yes - but only to our own Cloudflare Function which runs Ajv (the industry-standard JSON Schema validator) and returns validation results. Your data is processed in-memory and is not stored, logged, or shared. This function is part of the same Cloudflare Pages project, not a third-party service.
What is all-errors mode?
By default, the validator reports every violation in a single pass rather than stopping at the first error. This means you can see all issues at once and fix them before re-validating — much more efficient than fixing errors one at a time.
Does this tool support external $ref?
External HTTP(S) $ref references are intentionally disabled for privacy and security. Internal $ref pointers (#/$defs/Foo, #/properties/bar) resolve automatically within the same schema document.
Can I use this for OpenAPI validation?
This tool validates JSON Schema definitions, which are the foundation of OpenAPI 3.1. You can paste individual schema components from an OpenAPI spec. For full OpenAPI document validation (paths, operations, security), we recommend a dedicated OpenAPI linter.
What is the difference between JSON syntax validation and schema validation?
JSON syntax validation checks if your text is valid JSON (proper brackets, quotes, commas). Schema validation goes further — it checks if the data meets your specific contract: required fields present, correct data types, values within allowed ranges, patterns matched, enums respected. Our site also has a JSON Formatter for syntax validation and formatting.
Does it work offline?
No - this tool requires an internet connection because validation is performed by a Cloudflare Function running Ajv. However, your data is processed securely and never stored.
Related Tools
- JSON Formatter — Format, validate and beautify JSON
- YAML Validator — Validate and format YAML
- XML Formatter — Format and validate XML
- JSON to TypeScript — Generate TypeScript types from JSON
Comments & Ratings