JSON Schema Validator
Validate JSON data against a JSON Schema (Draft-07). Powered by Ajv — runs entirely in your browser.
What is JSON Schema?
JSON Schema is a standard (IETF Draft-07) for describing the structure of JSON data. It allows you to define required fields, property types, string patterns, numeric ranges, array constraints, and much more. APIs use JSON Schema to document request and response bodies, and applications use it to validate user input before processing.
A schema is itself a JSON document. You describe what your data should look like, and a validator like Ajv checks whether actual data conforms to that description.
How to Use This Validator
Paste or type your JSON data in the left panel and your JSON Schema in the right panel. Click Validate to run the check.
If the data is valid, you will see a green confirmation. If it is invalid, every error is listed with the path inside the data where the violation occurred and a plain-English description of the failing constraint. Click Sample to load a working example you can modify.
Common Schema Keywords
type — Specifies the data type: string, number, integer, boolean, array, object, or null. required — An array of property names that must be present in an object. properties — Defines schemas for named object properties. minLength / maxLength — Minimum and maximum character counts for strings. minimum / maximum — Numeric range constraints. pattern — A regular expression the string must match. format — Validates well-known string formats such as email, uri, and date-time. enum — Restricts the value to one of a fixed set of options. items — Defines the schema for elements in an array.
Related Tools
Frequently Asked Questions
What is JSON Schema?
+
JSON Schema is a vocabulary that lets you annotate and validate JSON documents. It describes the structure, data types, and constraints your JSON data must satisfy — for example, required fields, string formats, number ranges, and array item types. The most widely used draft is Draft-07, which this tool validates against.
What formats does this validator support?
+
This validator supports all JSON Schema Draft-07 keywords including type, required, properties, additionalProperties, items, minLength, maxLength, minimum, maximum, pattern, enum, anyOf, oneOf, allOf, and not. It also validates common string formats like email, uri, date, time, date-time, ipv4, ipv6, and uuid.
Is my data sent to a server?
+
No. All validation is performed entirely in your browser using the Ajv library. Your JSON data and schema never leave your device.
Why does my schema compile but validation still fails?
+
A schema that compiles without error is syntactically correct JSON Schema, but your data may still fail to meet its constraints. Check the error messages — each one includes the path inside the data (e.g. /address/zip) and the constraint that was violated (e.g. must match pattern ^[0-9]{5}$).
Can I validate arrays and nested objects?
+
Yes. Use the 'items' keyword to define the schema for each element in an array, and nest 'properties' objects as deeply as needed. The validator recursively checks every level and reports errors at each failing path.