JSON Schema Validator

One input per line. Output is numbered to match the input order.
Pinned tools are listed in your favourites on the home page.Copies a link to this tool that carries your current input, so it opens ready to run.Gives you an iframe snippet for putting this tool on your own site.
JSON Schema
JSON Data
Ctrl+Enter Run  · Ctrl+Shift+C Copy  · Esc Clear

Understand JSON Schema Validator

This validator checks a JSON document against a JSON Schema and lists each place the data does not match, with the path to the offending value.

How it works

It walks the data and the schema together, applying the keyword constraints at each level: type (including integer), enum, required, properties, additionalProperties, pattern, minLength and maxLength, minimum and maximum, items, minItems and maxItems. Errors carry a path such as $.user.email so you can find the value inside a large document. When a value has the wrong type the walk stops there, because every further check on it would be noise.

When to use it

  • Checking that an API response still matches the shape your client expects.
  • Testing a schema you are writing against one sample that should pass and one that should fail.
  • Finding which field in a large payload a service is rejecting.
  • Confirming a config file matches the schema its own tool publishes.

Watch out for

  • JSON Schema is permissive by default. A property not listed in properties is allowed unless additionalProperties is false, and a listed property is optional unless it is named in required — a schema that looks strict usually is not.
  • This implements a draft-07 subset. $ref, allOf, anyOf, oneOf, not, const, and format are not evaluated, so a schema using them reports on the parts it can check and stays silent about the rest.
  • type: number accepts integers, and type: integer accepts 1.0 as well as 1, because JSON has a single number type and 1.0 is that number.
  • A type mismatch suppresses the remaining errors on that value, so fixing one error can reveal more underneath it.

Not the right tool for: Schemas that lean on $ref, the combinators, or format assertions. Ajv is the reference implementation and checks what this cannot.

Frequently Asked Questions

What JSON Schema keywords are supported?

A draft-07 core subset: type (including integer and type arrays), required, properties, additionalProperties, enum, pattern, minLength/maxLength, minimum/maximum, items, minItems/maxItems, and nested schemas. Not implemented: format, const, $ref, and the allOf/anyOf/oneOf/not combinators. For full draft-07 coverage, use Ajv in your own build.

What is the difference between JSON Schema draft-07 and 2020-12?

Draft-07 is the most widely deployed version (used by default in many tools). Draft 2020-12 adds $dynamicRef, unevaluatedProperties, and improved $ref behavior. Use draft-07 unless your toolchain specifically requires a newer draft.

How do I validate an API response against a schema?

Paste your API response in the "Data" field and your OpenAPI/Swagger schema component in the "Schema" field. This is useful for ensuring API responses match their documented shape before writing client code.

How to Use JSON Schema Validator

  1. Paste or type your input in the input area above.
  2. The tool processes your input automatically or click Run.
  3. Copy or download the result using the action buttons.
  4. Use Ctrl+Enter to run quickly from the keyboard.