Developer Tools
JSON Schema Validator - Validate JSON Online
Validate any JSON document against a JSON Schema (Draft-07 subset) right in your browser. Supports type, required, properties, allOf/anyOf/oneOf, $ref, format checks, and more.
✓Valid - JSON matches the schema.
What is JSON Schema?
JSON Schema is a vocabulary for annotating and validating JSON documents. It lets you describe the structure of your data (which fields are required, what types they must be, what constraints apply) and then validate any JSON document against those rules.
Supported keywords (Draft-07 subset)
| Keyword | Description |
|---|---|
type | string, number, integer, boolean, null, array, object |
enum | Allowed values list |
const | Single allowed value |
required | Required object keys |
properties | Per-key sub-schemas |
additionalProperties | Allow / deny / schema for extra keys |
minimum / maximum | Numeric range (inclusive) |
exclusiveMinimum / exclusiveMaximum | Numeric range (exclusive) |
minLength / maxLength | String length |
pattern | String regex pattern |
format | date-time, date, email, uri, ipv4, uuid |
items | Array item schema |
minItems / maxItems | Array length |
uniqueItems | No duplicate array items |
allOf / anyOf / oneOf / not | Combining schemas |
$ref | Reference to #/definitions/… |
Common validation patterns
| Pattern | Schema snippet |
|---|---|
| Non-empty string | {"type":"string","minLength":1} |
| Positive integer | {"type":"integer","minimum":1} |
| ISO 8601 date | {"type":"string","format":"date"} |
| Email address | {"type":"string","format":"email"} |
| Required object field | {"required":["id","name"]} |
| Nullable field | {"anyOf":[{"type":"string"},{"type":"null"}]} |
| Enum values | {"enum":["draft","published","archived"]} |
Draft version history
- Draft 04 (2013): first widely adopted version; introduced
$schema,$ref,allOf - Draft 07 (2018): added
if/then/else,readOnly,writeOnly, moreformatvalues - Draft 2019-09: introduced
$anchor, deprecateddefinitionsin favor of$defs - Draft 2020-12: current standard; improved
$ref, addedprefixItemsfor tuples andunevaluatedProperties
When to use JSON Schema
- Validating API request and response payloads at runtime
- Enforcing configuration file structure across teams
- Documenting data contracts between microservices
- Generating forms and UI dynamically from schema definitions
-
Enabling IDE autocomplete in JSON/YAML config files (via
$schemaproperty)