JSON Schema Validator
Validate JSON data against JSON Schema definitions with detailed error messages and schema generation
Validate JSON
Quick Examples
Click to load example schema patterns
build Schema Builder
Build a schema visually by adding properties
menu_book JSON Schema Quick Reference
Type Keywords
| "type": "string" | String values |
| "type": "number" | Any numeric value |
| "type": "integer" | Whole numbers only |
| "type": "boolean" | true or false |
| "type": "array" | Arrays/lists |
| "type": "object" | Objects/maps |
| "type": "null" | null value |
String Validation
| "minLength": 1 | Min characters |
| "maxLength": 100 | Max characters |
| "pattern": "^..." | Regex pattern |
| "format": "email" | Email format |
| "format": "uri" | URI format |
| "format": "date" | ISO date |
| "format": "uuid" | UUID format |
Number Validation
| "minimum": 0 | Min value (inclusive) |
| "maximum": 100 | Max value (inclusive) |
| "exclusiveMinimum" | Min (exclusive) |
| "exclusiveMaximum" | Max (exclusive) |
| "multipleOf": 5 | Must be multiple |
Object Validation
| "properties" | Define properties |
| "required": [...] | Required fields |
| "additionalProperties" | Allow extra props |
| "minProperties" | Min prop count |
| "maxProperties" | Max prop count |
| "patternProperties" | Regex prop names |
Array Validation
| "items": {...} | Item schema |
| "minItems": 1 | Min array length |
| "maxItems": 10 | Max array length |
| "uniqueItems": true | No duplicates |
| "contains": {...} | Must contain item |
Composition
| "allOf": [...] | Must match all |
| "anyOf": [...] | Match at least one |
| "oneOf": [...] | Match exactly one |
| "not": {...} | Must not match |
| "if/then/else" | Conditional |
| "$ref": "..." | Reference schema |
About the JSON Schema Validator
Validate your JSON data against JSON Schema definitions with our free online validator. Perfect for developers, API designers, and anyone working with structured JSON data. Features real-time validation, comprehensive error messages, schema generation, and support for all major JSON Schema drafts—all running client-side in your browser for maximum privacy.
What is JSON Schema?
JSON Schema is a vocabulary that allows you to annotate and validate JSON documents. It describes your existing data format, provides clear human- and machine-readable documentation, and enables automated validation of data from clients, APIs, and configuration files.
Key Features
- Real-time Validation — Validate JSON against any JSON Schema with detailed error messages showing exact paths and issues
- Multiple Draft Support — Support for Draft-04, Draft-06, Draft-07, and Draft 2020-12 (latest) schemas
- Format Validation — Validate string formats like email, URI, date, date-time, IPv4, IPv6, UUID, and more
- Schema Generation — Automatically generate a JSON Schema from sample JSON data
- Visual Schema Builder — Build schemas visually without writing JSON by adding properties with types and constraints
- Detailed Errors — Get precise error messages with JSON paths, expected values, and suggestions
- Quick Examples — 8 pre-built schema examples covering common patterns (objects, arrays, enums, conditionals)
- Client-Side Processing — Everything runs in your browser; your data is never sent to any server
Supported JSON Schema Drafts
| Draft | $schema URI | Key Features |
|---|---|---|
| Draft 2020-12 | https://json-schema.org/draft/2020-12/schema | Latest standard, prefixItems, $dynamicRef |
| Draft-07 | https://json-schema.org/draft-07/schema# | if/then/else, readOnly, writeOnly |
| Draft-06 | https://json-schema.org/draft-06/schema# | const, contains, propertyNames |
| Draft-04 | http://json-schema.org/draft-04/schema# | Wide compatibility, base features |
Supported Format Keywords
When format validation is enabled, the following string formats are validated:
- email — Valid email addresses (RFC 5322)
- uri / uri-reference — Valid URIs and URI references
- date — ISO 8601 date (YYYY-MM-DD)
- time — ISO 8601 time (HH:MM:SS)
- date-time — ISO 8601 date-time
- duration — ISO 8601 duration
- ipv4 / ipv6 — IP addresses
- uuid — UUID format
- hostname — Valid hostnames
- regex — Valid regular expressions
- json-pointer — JSON Pointer (RFC 6901)
Common Use Cases
- Validating API request and response payloads
- Ensuring configuration files are correctly formatted
- Form data validation before submission
- Database schema documentation and validation
- Generating TypeScript interfaces from schemas
- Testing mock data against expected schemas
- Contract testing between microservices
Schema Best Practices
- Always include $schema — Specify which draft your schema uses for consistent validation
- Use required arrays — Explicitly list all required properties rather than relying on defaults
- Add descriptions — Include human-readable descriptions for documentation
- Use format keywords — Leverage built-in format validation for common patterns
- Consider additionalProperties — Set to false for strict validation or define patterns
- Test edge cases — Validate with both valid and invalid data to ensure schema is correct