{ JSON Schema Validator }

// validate JSON data against a JSON Schema definition

Validate JSON data against a JSON Schema definition. Supports Draft-07 keywords: type, required, properties, enum, format, minimum, pattern, allOf, anyOf, oneOf, not. Free, no sign-up.

JSON SCHEMA VALIDATOR
Templates:
JSON SCHEMA 0 rules
JSON DATA 0 keys
VALIDATION RESULTS
βœ”

Validation results appear here

Paste schema + data then click Validate

// JSON SCHEMA KEYWORD REFERENCE

CORE KEYWORDS
typeValue type: "string", "number", "integer", "boolean", "object", "array", "null"
enumValue must be one of the listed values
constValue must exactly equal this constant
STRING KEYWORDS
minLengthMinimum string length
maxLengthMaximum string length
patternString must match regex pattern
formatSemantic format: email, date, uri, uuid…
NUMBER KEYWORDS
minimumMinimum value (inclusive)
maximumMaximum value (inclusive)
exclusiveMinimumMinimum value (exclusive)
exclusiveMaximumMaximum value (exclusive)
multipleOfMust be a multiple of this number
OBJECT KEYWORDS
requiredArray of required property names
propertiesSchema for each property
additionalPropertiesfalse to disallow unknown properties
minPropertiesMinimum number of properties
maxPropertiesMaximum number of properties
ARRAY KEYWORDS
itemsSchema that each array element must match
minItemsMinimum number of items
maxItemsMaximum number of items
uniqueItemstrue β€” all items must be unique
COMPOSITION KEYWORDS
allOfMust be valid against ALL schemas in array
anyOfMust be valid against AT LEAST ONE schema
oneOfMust be valid against EXACTLY ONE schema
notMust NOT be valid against the schema
if / then / elseConditional schema application

HOW TO USE

  1. 01
    Load a template or paste your schema

    Click a template button to load a ready-made schema, or paste your own JSON Schema in the left panel. Use the sample data that loads with the template or paste your own JSON data.

  2. 02
    Click Validate

    The validator checks every constraint in the schema against the data and reports each violation with the exact path and a clear error message.

  3. 03
    Fix and retest

    Fix the data or schema based on the error messages and validate again. Changes update automatically with the live validate option.

FEATURES

Draft-07 support Type validation Composition Format checks Error paths 4 templates

USE CASES

  • βœ” Validate API request/response payloads
  • βœ” Test configuration files against a schema
  • βœ” Debug schema definitions before deploying
  • βœ” Learn JSON Schema by experimenting live
  • βœ” Validate form data structure before processing

WHAT IS THIS?

JSON Schema Validator checks whether JSON data conforms to a JSON Schema definition. It implements the JSON Schema Draft-07 specification including type checking, required fields, property schemas, string/number/array constraints, format validation, and composition keywords β€” entirely in your browser, free, with no data sent anywhere.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What is JSON Schema?

JSON Schema is a declarative language for describing the structure and validation rules of JSON data. A JSON Schema document is itself a JSON object that specifies what values are valid β€” their types, required fields, string patterns, numeric ranges, and more. JSON Schema is widely used to document APIs (OpenAPI uses it), validate configuration files, generate forms, and enforce data contracts between services. The current widely supported draft is Draft-07, though Draft 2019-09 and 2020-12 also exist.

What is the difference between allOf, anyOf, and oneOf?

allOf requires the data to be valid against every schema in the array β€” it is a logical AND. anyOf requires the data to be valid against at least one schema in the array β€” a logical OR that allows multiple schemas to match. oneOf requires the data to be valid against exactly one schema β€” a logical exclusive OR. If zero or more than one schema in a oneOf matches, validation fails. oneOf is commonly used to define mutually exclusive variants of a type.

What format keywords are supported?

The format keyword is validated against these standard formats: email (basic email pattern), date (YYYY-MM-DD), time (HH:MM:SS), date-time (ISO 8601), uri (URL pattern), uuid (UUID v4 pattern), ipv4 (IPv4 address), ipv6 (IPv6 address), and hostname. The JSON Schema specification defines format as advisory by default, but this tool validates all listed formats as hard constraints.

What does additionalProperties: false do?

By default, JSON Schema allows an object to have any properties beyond those listed in properties. Setting additionalProperties: false makes the schema strict β€” only the properties explicitly listed in properties (and patternProperties) are allowed. Any extra key in the data produces a validation error. This is useful for catching typos in property names and for enforcing strict API contracts where unexpected fields should be rejected.

How do required and properties work together?

required is a list of property names that must be present in the object β€” it controls which keys are mandatory. properties defines the schema that each named property must conform to, but does not make any property required by itself. A property can be in properties but not in required (it is optional but validated if present), or in required but not in properties (it must be present but can be any value).

What JSON Schema draft does this tool implement?

This tool implements JSON Schema Draft-07, which is the most widely supported version and the one used by the majority of tools and libraries. Draft-07 introduced if/then/else conditional schemas and the readOnly/writeOnly keywords. It is the version used by VS Code's JSON language server, OpenAPI 3.0, and most popular validation libraries. Draft 2019-09 and 2020-12 are newer but less universally supported.

JSON Schema Validator β€” Validate JSON Data Against a Schema Free

JSON Schema has become the standard way to define the expected structure of JSON data β€” what fields are required, what types each field must have, what ranges and patterns are acceptable, and what combinations of values are valid. Validating JSON against a schema is an essential step in API development, data pipeline construction, and configuration management. This validator implements the JSON Schema Draft-07 specification and checks every constraint defined in the schema.

Type Validation

The type keyword is the most fundamental constraint. JSON Schema distinguishes seven types: string, number, integer (a number with no fractional part), boolean, object, array, and null. Types can be specified as a single string or as an array to allow multiple types. The validator checks the actual JavaScript type of each value against the schema's type constraint and reports mismatches with the exact path to the failing value.

Required Fields and Property Schemas

The required array lists which properties must be present in an object. If any required property is missing from the data, validation fails with a clear message identifying the missing key and its location in the document. The properties object maps each property name to a schema that the property's value must satisfy β€” enabling recursive validation of deeply nested structures.

Composition and Conditional Schemas

JSON Schema's composition keywords β€” allOf, anyOf, oneOf, and not β€” enable complex validation logic. They allow schema authors to express unions of types, discriminated unions, and negations. The if/then/else keywords (introduced in Draft-07) enable conditional validation: if a value matches the if schema, it must also match the then schema; otherwise it must match the else schema. This is used for polymorphic validation where different sets of rules apply depending on the value of a discriminator field.

β˜•