Skip to content
Toolcroft

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)

KeywordDescription
typestring, number, integer, boolean, null, array, object
enumAllowed values list
constSingle allowed value
requiredRequired object keys
propertiesPer-key sub-schemas
additionalPropertiesAllow / deny / schema for extra keys
minimum / maximumNumeric range (inclusive)
exclusiveMinimum / exclusiveMaximumNumeric range (exclusive)
minLength / maxLengthString length
patternString regex pattern
formatdate-time, date, email, uri, ipv4, uuid
itemsArray item schema
minItems / maxItemsArray length
uniqueItemsNo duplicate array items
allOf / anyOf / oneOf / notCombining schemas
$refReference to #/definitions/…

Common validation patterns

PatternSchema 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, more format values
  • Draft 2019-09: introduced $anchor, deprecated definitions in favor of $defs
  • Draft 2020-12: current standard; improved $ref, added prefixItems for tuples and unevaluatedProperties

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 $schema property)