JSON Data
JSON Schema
Validation Result Pending
Enter JSON data and schema to validate

About JSON Schema

JSON Schema is a vocabulary for annotating and validating JSON documents. It describes the expected format of JSON data and is used for API validation, configuration file verification, and automated documentation generation.

What is JSON Schema?

  • Declarative validation - describe what valid data looks like, not how to check it
  • IETF specification - standardized and widely supported across languages
  • Composable - schemas can reference and extend other schemas
  • Self-documenting - schemas serve as both validation rules and documentation

Core Keywords

Keyword Description Example
typeRestricts the data type"type": "string"
propertiesDefines expected object properties"properties": {"name": {"type": "string"}}
requiredLists properties that must be present"required": ["name", "email"]
itemsSchema for array elements"items": {"type": "number"}
enumRestricts to a set of values"enum": ["active", "inactive"]
constRestricts to a single value"const": "v1"
$refReferences another schema"$ref": "#/$defs/Address"
additionalPropertiesControls unlisted properties"additionalProperties": false

Type Validation

Type Validates Useful Keywords
stringText valuesminLength, maxLength, pattern, format
numberAny numeric valueminimum, maximum, multipleOf
integerWhole numbers onlyminimum, maximum
booleantrue or false-
arrayOrdered listsitems, minItems, maxItems, uniqueItems
objectKey-value pairsproperties, required, additionalProperties
nullNull value only-