📋 JSON Schema Validator — Validate JSON Online

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.

Draft 7 keywordsError path navigation5 schema presets100% private
AdSense — 728×90 Leaderboard
📋 JSON Schema Validator

Validate JSON Data Against Your Schema

Paste schema left, JSON right. Validates instantly in your browser — nothing sent to any server.

Load preset:
SCHEMA JSON Schema (Draft 7)
JSON DATA Data to validate
Validation errors
Click an error to navigate to that location in the JSON
AdSense — 728×90 Leaderboard

JSON Schema keyword reference

📝
Core Keywords
Type & required
Structure validation
typestring, number, integer, boolean, object, array, null
requiredArray of required property names
propertiesSub-schemas per property
additionalPropertiesfalse = no extra keys
🔢
Value Constraints
String & number
Range and format
minLength / maxLengthString length bounds
patternRegex match for strings
minimum / maximumNumber bounds
enum / constAllowed values list
📦
Array & Object
Items & length
Collection constraints
itemsSchema for array elements
minItems / maxItemsArray length bounds
uniqueItemsNo duplicate values
containsAt least one match
🧩
Combining Schemas
anyOf / oneOf
Composition keywords
anyOfMatch at least one
oneOfMatch exactly one
allOfMatch all schemas
if / then / elseConditional validation
🗄️
Format raw JSON before pasting into the validator.
Use the free JSON Formatter to pretty-print, validate syntax and minify JSON before running schema validation.
JSON Formatter →
⭐ Ratings

Rate this tool

4.9
★★★★★
Based on 28,600 ratings
5
10,120
4
435
3
218
2
109
1
0
Was this your schema photo guide helpful?
Thank you! G'day!
What Is JSON Schema?

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?

Catch bugs before they reach production — Invalid JSON data causes runtime errors that are hard to debug. A missing required field, a string where a number is expected, an out-of-range value — these bugs are trivial to catch with schema validation but expensive to diagnose in production. Validate API requests and responses at the boundary of your application.
Document your data contracts — A JSON Schema is machine-readable documentation. It tells other developers exactly what your API accepts and returns, without ambiguity. OpenAPI (Swagger) uses JSON Schema to document every request and response body. Tools like Postman, Insomnia, and API gateways read these schemas to generate tests, mocks, and client SDKs.
Automate testing and QA — Schema validation can be added to CI/CD pipelines to automatically reject PRs that return API responses not conforming to the documented schema. Contract testing tools like Pact, Dredd, and Spectral use JSON Schema to verify that APIs match their specifications across breaking changes.
Keyword Reference

JSON Schema Draft 7 Keywords — Complete Reference

All keywords supported by this validator. Paste any of these into the schema editor above.

Type keywords

KeywordApplies toDescriptionExample
typeAnyData type: string, number, integer, boolean, object, array, null. Can be an array of types."type": "string"
enumAnyValue must be one of the listed values (exact match)"enum": ["a","b","c"]
constAnyValue must equal exactly this single value"const": "active"

String keywords

KeywordDescriptionExample
minLengthMinimum string length (inclusive)"minLength": 1
maxLengthMaximum string length (inclusive)"maxLength": 100
patternString must match this regular expression"pattern": "^[A-Z]{2}-[0-9]{4}$"
formatSemantic format: email, uri, date, date-time, time, uuid, ipv4, ipv6, hostname, json-pointer, regex"format": "email"

Number keywords

KeywordDescriptionExample
minimumMinimum value (inclusive). Set exclusiveMinimum: true for exclusive."minimum": 0
maximumMaximum value (inclusive). Set exclusiveMaximum: true for exclusive."maximum": 100
exclusiveMinimumExclusive minimum (Draft 6+: a number, not boolean)"exclusiveMinimum": 0
exclusiveMaximumExclusive maximum (Draft 6+: a number, not boolean)"exclusiveMaximum": 1
multipleOfValue must be a multiple of this number"multipleOf": 5

Object keywords

KeywordDescriptionExample
requiredArray of property names that must be present"required": ["name", "email"]
propertiesSub-schemas for specific properties"properties": {"name": {"type": "string"}}
additionalPropertiesfalse = no extra properties. Schema = validate extras against it."additionalProperties": false
patternPropertiesSub-schemas for properties matching a regex pattern"patternProperties": {"^S_": {"type": "string"}}
minPropertiesMinimum number of properties"minProperties": 1
maxPropertiesMaximum number of properties"maxProperties": 10
dependenciesProperty A requires property B to also be present"dependencies": {"billing": ["address"]}
propertyNamesSchema that property names must match"propertyNames": {"pattern": "^[a-z]"}

Array keywords

KeywordDescriptionExample
itemsSchema for array elements. Array of schemas for tuple validation."items": {"type": "string"}
minItemsMinimum array length"minItems": 1
maxItemsMaximum array length"maxItems": 100
uniqueItemsAll items must be unique (deep equality)"uniqueItems": true
containsAt least one item must match this schema"contains": {"type": "number"}
additionalItemsfalse = no items beyond the tuple length"additionalItems": false

Combining keywords

KeywordDescription
allOfValid if data matches ALL schemas in the array
anyOfValid if data matches AT LEAST ONE schema in the array
oneOfValid if data matches EXACTLY ONE schema in the array
notValid if data does NOT match this schema
if / then / elseConditional: if matches if-schema, apply then-schema; otherwise apply else-schema
Schema Examples

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"]}}
Comparison

LazyTools vs Other JSON Schema Validators

FeatureLazyToolsjsonschemavalidator.netjsonschema.devJSONLint 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
FAQ

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.

Related tools

More Free Developer Tools