✅ JSON Schema Validator

JSON Schema
JSON data to validate

✓ Data conforms to the schema

Enter a JSON Schema and a JSON document to check whether the data conforms to the schema. Supports the core JSON Schema keywords: type, required, properties, enum, minimum/maximum, pattern, and more.

How to use

  1. Enter your JSON Schema (validation rules) on the left.
  2. Enter the JSON data you want to validate on the right.
  3. Any validation errors are listed automatically.

How the calculation works

JSON Schema describes the shape of JSON data — types, required fields, allowed ranges and so on — in JSON itself. This tool checks data against a schema and lists anything that does not conform. Supported keywords • type (string, number, integer, boolean, object, array, null) • enum, const • Numbers: minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf • Strings: minLength, maxLength, pattern • Arrays: items, minItems, maxItems, uniqueItems • Objects: properties, required, additionalProperties: false, minProperties, maxProperties Nested properties and items are followed, and each error shows its location as a path such as address.city or tags[2]. String length is counted in characters (code points), as the JSON Schema specification requires.

Worked example

Schema {"type": "object", "required": ["name", "age"], "properties": {"name": {"type": "string", "minLength": 1}, "age": {"type": "integer", "minimum": 0}}} Result for data {"name": "", "age": 3.5} name: length must be >= 1 age: expected type "integer", got "number" Data {"name": "Alice", "age": 30} passes with no errors.

Things to be aware of

  • $ref, allOf/anyOf/oneOf, if/then/else and format (email, date and so on) are not supported. For full validation, use a library such as Ajv.
  • integer also accepts numbers whose fractional part is zero, such as 1.0.
  • pattern matches anywhere in the string (not the whole string); wrap it in ^ and $ to validate the entire value.

FAQ

Does this support the full JSON Schema specification?

No — this tool supports a practical subset: type, required, properties, additionalProperties, enum, const, minimum/maximum, exclusiveMinimum/exclusiveMaximum, multipleOf, minLength/maxLength, pattern, items, minItems/maxItems, uniqueItems, and minProperties/maxProperties. It does not support advanced composition keywords like allOf, oneOf, anyOf, or $ref.

No errors show up but the validation result still seems wrong — why?

You may be relying on a keyword this tool doesn't support. Check the supported keyword list in the FAQ above.

What is JSON Schema?

It's a specification for describing the structure and constraints of JSON data. It's widely used to validate API request/response shapes and configuration files.