Formatter Validator Minifier JSON ↔ YAML JSON → CSV JSON ↔ XML JSON Diff Schema Validator JSONPath Tester JWT Decoder More Tools Blog FAQ
JSON Schema · Draft 7 / 2019-09 / 2020-12

JSON Schema Validator

Validate a JSON document against a JSON Schema. Catches type mismatches, missing required fields, out-of-range values, regex failures, and constraint violations. Essential for API contract testing and config validation.

📋 JSON Schema
📄 JSON document
Validation results
Paste a schema and document, then click Validate
What is JSON Schema?

What is JSON Schema?

JSON Schema is a vocabulary for describing the structure of JSON data. Think of it as a type system for JSON: a way to specify what fields a JSON document should have, what types those fields should be, what values are allowed, and how fields relate to each other. A JSON Schema is itself a JSON document — so it can be transmitted, stored, and version-controlled like any other data.

Schemas matter because JSON itself is dynamically typed. Without a schema, your code has to guess what shape a JSON document will have. With a schema, you can validate inputs before processing, generate type definitions automatically, document APIs precisely, and even generate test fixtures or mock data.

JSON Schema is the most widely used schema vocabulary for JSON. OpenAPI uses it for request and response definitions. AsyncAPI uses it for event payloads. AJV (the most popular JSON Schema library) ships in npm 50+ million times per week. If you work with JSON APIs at any scale, you'll encounter JSON Schema.

How JSON Schema validation works

How JSON Schema validation works

You provide two things: a schema (the rules) and a document (the data to validate). The validator checks the document against every rule in the schema and reports either "valid" or a list of every rule that failed.

Example schema:

{
  "type": "object",
  "required": ["id", "name", "email"],
  "properties": {
    "id":    { "type": "integer", "minimum": 1 },
    "name":  { "type": "string", "minLength": 1 },
    "email": { "type": "string", "format": "email" },
    "age":   { "type": "integer", "minimum": 0, "maximum": 150 }
  },
  "additionalProperties": false
}

This schema requires an object with three mandatory fields, type-checks each one, validates the email format, constrains the age range, and forbids any other fields. A document that omits "email" would produce an error like "Missing required property: email". A document with an extra field would produce "Additional property X not allowed".

Schema features supported

Schema features supported

Our validator supports the practical subset of JSON Schema used in 95%+ of real-world schemas:

T Type validation

type with string, number, integer, boolean, null, array, object — or arrays of types for unions.

R Required & optional

required list, additionalProperties: false for closed schemas, minProperties and maxProperties.

S String constraints

minLength, maxLength, pattern (regex), format (email, uri, uuid, date, date-time, ipv4).

N Number constraints

minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf.

A Array constraints

items (single schema or tuple), minItems, maxItems, uniqueItems.

E Enums & consts

enum (list of allowed values), const (must equal this value).

Composition

allOf, anyOf, oneOf — match all, any, or exactly one subschema.

$ Local references

$ref resolving to #/definitions/X within the same schema. (External URLs not fetched.)

Common questions

FAQ — Json Schema Validator

What's the difference between JSON Schema and JSON itself?
JSON is the data format. JSON Schema is a meta-format — a vocabulary for describing what valid JSON looks like for a particular use case. A JSON Schema document is itself written in JSON, but it describes constraints rather than data. Think of it like the relationship between TypeScript type definitions and JavaScript code.
Which JSON Schema drafts are supported?
Draft 7 by default, which is the most widely used. We have partial support for Draft 2019-09 and 2020-12. Most schemas you'll encounter in the wild (OpenAPI 3.0/3.1, AsyncAPI, npm package definitions) use Draft 7 or a compatible subset. The drafts are mostly additive — schemas written for older drafts validate fine.
How do I know if my data validates?
Paste your schema and your data into the respective panels. If the document conforms to every rule in the schema, you'll see a green "valid" indicator. If not, the validator lists each failing rule with the JSON path where it failed and a human-readable description.
Why use schema validation instead of just type-checking in code?
Schemas are data, not code. That means: (1) you can share them across languages (the same schema works for a JS frontend, Python backend, and Go service); (2) you can serve them via HTTP for clients to discover; (3) you can generate type definitions in any language from them; (4) you can use them for documentation. Hand-written validation in each language drifts over time; a single schema source of truth doesn't.
Does this validator fetch external $ref URLs?
No — we resolve only local references like #/definitions/X within the same schema document. Fetching external schemas would require network requests, which contradicts our privacy-first design. For external refs, inline them first (using json-dereference-cli or similar).
What's the difference between this and AJV?
AJV is the most popular JavaScript JSON Schema validator — a full implementation with compile-time optimizations and complete spec support. Our validator is a lighter-weight implementation focused on the common cases, with a friendly UI. For production validation in code, use AJV. For one-off validation in a browser, our tool is faster to use.
Can I validate OpenAPI request/response shapes?
Yes — OpenAPI request/response schemas are JSON Schemas. Extract the relevant schema from your OpenAPI document (look under components.schemas or inline under requestBody.content.application/json.schema) and paste it here along with the request or response body.
How do I generate a JSON Schema from existing data?
Tools like quicktype (online and CLI) infer schemas from sample JSON. The inferred schema is a starting point — you'll usually want to tighten constraints (required fields, value ranges, regex patterns) by hand.
Does the validator support custom format keywords?
We implement the standard formats: email, uri/url, uuid, date, time, date-time, ipv4, ipv6. Custom format keywords (specific to your application) are accepted but only constrained by the type field — they don't trigger format-specific validation.
Can I use this for very large schemas?
Yes, schemas of any size work — schemas themselves are usually small (a few KB to a few hundred KB). The data being validated can be up to 50 MB without issues. The bottleneck is typically how complex the schema is, not how big it is.
Our Network