JSON Schema Validator Validate JSON Data Against Your Schema — Instant, Private, Free
Paste your JSON Schema on the left and JSON data on the right. The validator checks every constraint and shows errors with the exact JSON path where each violation occurs. Supports JSON Schema Draft 7 keywords: type, required, properties, additionalProperties, pattern, format (email, URI, UUID, date, IPv4/v6), enum, const, anyOf, oneOf, allOf, not, if/then/else, items, uniqueItems, dependencies, and more. All validation runs entirely in your browser — no data is ever sent to any server. Load from 5 ready-made schema presets to get started instantly.
Validate JSON Data Against Your Schema
Paste schema left, JSON right. Validates instantly in your browser — nothing sent to any server.
JSON Schema keyword reference
typestring, number, integer, boolean, object, array, nullrequiredArray of required property namespropertiesSub-schemas per propertyadditionalPropertiesfalse = no extra keysminLength / maxLengthString length boundspatternRegex match for stringsminimum / maximumNumber boundsenum / constAllowed values listitemsSchema for array elementsminItems / maxItemsArray length boundsuniqueItemsNo duplicate valuescontainsAt least one matchanyOfMatch at least oneoneOfMatch exactly oneallOfMatch all schemasif / then / elseConditional validationRate this tool
JSON Schema — The Vocabulary for Validating JSON Data
JSON Schema is a standard vocabulary for annotating and validating JSON documents. Where JSON describes data, JSON Schema describes the shape of that data — what properties are required, what types they must be, what values are allowed, how long strings can be, what patterns they must match. It is the lingua franca of API contracts, configuration validation, and data pipeline quality assurance.
JSON Schema is maintained by the JSON Schema organisation (json-schema.org) and has gone through several drafts. Draft 7 is the most widely supported version across libraries and tools. Draft 2020-12 is the current specification. This validator implements the core Draft 7 keyword set.
Why validate JSON against a schema?
JSON Schema Draft 7 Keywords — Complete Reference
All keywords supported by this validator. Paste any of these into the schema editor above.
Type keywords
| Keyword | Applies to | Description | Example |
|---|---|---|---|
| type | Any | Data type: string, number, integer, boolean, object, array, null. Can be an array of types. | "type": "string" |
| enum | Any | Value must be one of the listed values (exact match) | "enum": ["a","b","c"] |
| const | Any | Value must equal exactly this single value | "const": "active" |
String keywords
| Keyword | Description | Example |
|---|---|---|
| minLength | Minimum string length (inclusive) | "minLength": 1 |
| maxLength | Maximum string length (inclusive) | "maxLength": 100 |
| pattern | String must match this regular expression | "pattern": "^[A-Z]{2}-[0-9]{4}$" |
| format | Semantic format: email, uri, date, date-time, time, uuid, ipv4, ipv6, hostname, json-pointer, regex | "format": "email" |
Number keywords
| Keyword | Description | Example |
|---|---|---|
| minimum | Minimum value (inclusive). Set exclusiveMinimum: true for exclusive. | "minimum": 0 |
| maximum | Maximum value (inclusive). Set exclusiveMaximum: true for exclusive. | "maximum": 100 |
| exclusiveMinimum | Exclusive minimum (Draft 6+: a number, not boolean) | "exclusiveMinimum": 0 |
| exclusiveMaximum | Exclusive maximum (Draft 6+: a number, not boolean) | "exclusiveMaximum": 1 |
| multipleOf | Value must be a multiple of this number | "multipleOf": 5 |
Object keywords
| Keyword | Description | Example |
|---|---|---|
| required | Array of property names that must be present | "required": ["name", "email"] |
| properties | Sub-schemas for specific properties | "properties": {"name": {"type": "string"}} |
| additionalProperties | false = no extra properties. Schema = validate extras against it. | "additionalProperties": false |
| patternProperties | Sub-schemas for properties matching a regex pattern | "patternProperties": {"^S_": {"type": "string"}} |
| minProperties | Minimum number of properties | "minProperties": 1 |
| maxProperties | Maximum number of properties | "maxProperties": 10 |
| dependencies | Property A requires property B to also be present | "dependencies": {"billing": ["address"]} |
| propertyNames | Schema that property names must match | "propertyNames": {"pattern": "^[a-z]"} |
Array keywords
| Keyword | Description | Example |
|---|---|---|
| items | Schema for array elements. Array of schemas for tuple validation. | "items": {"type": "string"} |
| minItems | Minimum array length | "minItems": 1 |
| maxItems | Maximum array length | "maxItems": 100 |
| uniqueItems | All items must be unique (deep equality) | "uniqueItems": true |
| contains | At least one item must match this schema | "contains": {"type": "number"} |
| additionalItems | false = no items beyond the tuple length | "additionalItems": false |
Combining keywords
| Keyword | Description |
|---|---|
| allOf | Valid if data matches ALL schemas in the array |
| anyOf | Valid if data matches AT LEAST ONE schema in the array |
| oneOf | Valid if data matches EXACTLY ONE schema in the array |
| not | Valid if data does NOT match this schema |
| if / then / else | Conditional: if matches if-schema, apply then-schema; otherwise apply else-schema |
JSON Schema Examples for Common API Patterns
User registration payload
Click the "User object" preset above to load this example into the validator.
{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["name","email","password"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":8},"age":{"type":"integer","minimum":13}},"additionalProperties":false}
Validating API list responses
{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"integer","minimum":1},"name":{"type":"string"},"active":{"type":"boolean"}}}},"meta":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"page":{"type":"integer","minimum":1}}}}}
Conditional required fields (if/then/else)
{"type":"object","properties":{"paymentType":{"type":"string","enum":["card","invoice"]},"cardNumber":{"type":"string"},"invoiceEmail":{"type":"string","format":"email"}},"if":{"properties":{"paymentType":{"const":"card"}}},"then":{"required":["cardNumber"]},"else":{"required":["invoiceEmail"]}}
LazyTools vs Other JSON Schema Validators
| Feature | LazyTools | jsonschemavalidator.net | jsonschema.dev | JSONLint Schema |
|---|---|---|---|---|
| 100% browser-side (private) | ✅ No server calls | ❌ Sends to server | ✅ Yes (AJV) | ❌ Server-side |
| Error path navigation | ✅ Click to navigate | ⚠ Paths listed only | ✅ Yes | ❌ No |
| Format validation | ✅ email, uri, uuid, date... | ✅ Yes | ✅ Yes (AJV) | ❌ No |
| Schema presets | ✅ 5 real-world examples | ❌ None | ❌ None | ❌ None |
| Format (pretty-print) button | ✅ Both editors | ❌ No | ⚠ Partial | ✅ Yes |
| Line numbers | ✅ Both editors | ❌ No | ⚠ Partial | ❌ No |
| No account required | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
JSON Schema FAQ
A vocabulary for annotating and validating JSON documents. It describes the structure, types, and constraints your JSON must follow. Used in API documentation (OpenAPI), form validation, and data pipelines. Current stable versions: Draft 7 and Draft 2020-12.
Paste your JSON Schema in the left editor and JSON data in the right editor. The validator checks every constraint and shows errors with JSON paths. Click any error to navigate to that location. All validation runs in your browser — no data sent to any server.
type, required, properties, additionalProperties, patternProperties, pattern, minLength, maxLength, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, enum, const, minItems, maxItems, uniqueItems, items, contains, anyOf, oneOf, allOf, not, if/then/else, dependencies, contains, propertyNames, format. See the keyword reference table above.
An array of property names that must be present in the object. Example: {"required": ["name", "email"]} means both name and email must exist as keys. If either is missing, validation fails with a "Required property is missing" error.
Controls whether extra properties (not in the properties map) are allowed. additionalProperties: false rejects any unknown keys. additionalProperties: {type: string} validates extra properties against that schema. Omitting it allows any additional properties.
anyOf: valid if any one schema matches. oneOf: valid if exactly one schema matches — zero or two+ matches fails. Use anyOf for flexible union types. Use oneOf for exclusive choice between mutually exclusive structures.
Annotates a string with a semantic format. This validator enforces: email, uri, date, date-time, time, uuid, ipv4, ipv6, hostname, regex, json-pointer. Format validation is optional in the spec — some validators ignore it.
Paste schema left, JSON right. Validates instantly in your browser. Error list with JSON paths. Format button for both editors. 5 presets. Free, no account. No data sent to any server.
number accepts any JSON number including decimals (1.5, 3.14). integer accepts only whole numbers (1, 42, -7). Use integer for IDs, counts, ages. Use number for prices, coordinates, measurements.
Use {"type": "array", "items": {object schema here}}. The items schema applies to every element. Add minItems/maxItems for length constraints and uniqueItems: true to require all items to be distinct.
A URI declaring which JSON Schema version to use. Use "http://json-schema.org/draft-07/schema#" for Draft 7. Including $schema is best practice — it enables IDE autocompletion and ensures validators apply the right rules.
If data matches the if schema, the then schema is also applied. If not, the else schema (if present) is applied. Used for conditional required fields: if type is "premium" then billing is required.
Restricts a value to one of the listed values: {"enum": ["active", "inactive", "pending"]}. For a single allowed value, use const instead: {"const": "active"}.
Use properties with a sub-schema for each property. Each sub-schema can itself have type, required, and properties for deeper nesting. There is no nesting limit in JSON Schema.
Foundation of OpenAPI (Swagger) specifications. Used to document every request and response body. Tools like Postman, API gateways, and mock servers use the schema to generate tests and client SDKs. Also used in form validation, MongoDB document validation, Kafka message validation, and configuration linting.
Paste schema and data in the editors above. Validates instantly in your browser. Nothing sent to any server. Error list with paths. Format button. 5 ready-made presets. Free, no signup, no account.