JSON Schema Validator

Paste a schema and some JSON to see exactly which values break which rule — or generate a starting schema from example data. Powered by Ajv, the most used JSON Schema validator.

Runs in your browserUpdated

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the JSON Schema Validator

  1. Paste the JSON Schema on the left and the JSON to check on the right (YAML works too).
  2. The draft is detected from $schema, or choose it manually.
  3. Read the list of errors: the JSON location, the problem and the schema rule that failed.
  4. 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

ColumnMeaning
WhereA JSON Pointer to the failing value, e.g. /items/0/qty = first item’s qty
ProblemWhat is wrong: wrong type, missing required property, value not allowed, unexpected property…
Schema ruleThe 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 required inside a property instead of on the parent object.
  • Expecting format to be enforced everywhere — many validators only annotate formats unless asked to check them.
  • Using "type": "integer" for values like 1.0 that 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?
Ajv 8, the most widely used JavaScript implementation, running in your browser.
Can I generate a JSON Schema from JSON?
Yes. Paste example data and click “Generate schema from data”. Types, nested objects, arrays, common formats and required keys are inferred.
Does it support $ref to other files?
References inside the same schema (#/$defs/...) work. External URLs are not fetched; inline those definitions first.
Is my data uploaded?
No. Validation runs in your browser.

Related tools