How to use the JSON Schema Validator
- Paste the JSON Schema on the left and the JSON to check on the right (YAML works too).
- The draft is detected from
$schema, or choose it manually. - Read the list of errors: the JSON location, the problem and the schema rule that failed.
- No schema yet? Paste example data and click Generate schema from data.
What is JSON Schema?
JSON Schema is a vocabulary for describing the shape of JSON data: which properties exist, their types, which are required, allowed values, string formats, number ranges and array lengths. It is used to validate API requests and responses, configuration files, form input and data pipelines, and it is the basis of OpenAPI request and response definitions.
Reading the errors
| Column | Meaning |
|---|---|
| Where | A JSON Pointer to the failing value, e.g. /items/0/qty = first item’s qty |
| Problem | What is wrong: wrong type, missing required property, value not allowed, unexpected property… |
| Schema rule | The path to the keyword in the schema that rejected the value, e.g. #/properties/items/items/properties/qty/minimum |
Drafts
JSON Schema has several versions. Draft 2020-12 is current (OpenAPI 3.1 uses it); draft-07 is still the most widely supported in libraries and editors; draft-04 appears in older specs such as Swagger 2.0 and OpenAPI 3.0. The validator reads $schema to pick the right rules. Differences that trip people up: draft-04 uses id instead of $id and boolean exclusiveMinimum; 2019-09 replaced definitions with $defs and added unevaluatedProperties.
Common mistakes
- Forgetting
"additionalProperties": false— without it, unknown properties are allowed. - Putting
requiredinside a property instead of on the parent object. - Expecting
formatto be enforced everywhere — many validators only annotate formats unless asked to check them. - Using
"type": "integer"for values like1.0that arrive as decimals from some languages.
Generated schemas are a starting point: tighten them with patterns, enums and limits. Explore large documents in the JSON viewer or derive TypeScript types with JSON to TypeScript. Validating an API spec? Use the OpenAPI validator.
Tools that pair well with the JSON Schema Validator
- YAML Validator — Paste a Docker Compose file, Kubernetes manifest, GitHub Actions workflow or any YAML to pinpoint errors, catch common pitfalls and get a cleanly formatted version.
- JSONPath Tester — Type a JSONPath query and instantly see what it selects — with the exact path of each match.
- YAML to JSON — Paste YAML — a Compose file, Kubernetes manifest or CI config — and get formatted JSON.
- JSON to CSV — Turn a JSON array into a spreadsheet-ready CSV.
Frequently asked questions
Which JSON Schema validator does this use?
Can I generate a JSON Schema from JSON?
Does it support $ref to other files?
#/$defs/...) work. External URLs are not fetched; inline those definitions first.