JSON Schema Validator
Validate JSON data against a JSON Schema. Everything runs locally in your browser — no data sent anywhere.
JSON Data
JSON Schema
About JSON Schema
JSON Schema is a declarative language for describing and validating the structure of JSON data. It lets you define what shape your data should take, what fields are required, what types values must be, and many other constraints.
What is JSON Schema used for?
- API validation — Ensure request and response bodies match expected formats
- Configuration files — Validate config files before deployment
- Data interchange — Define contracts between services
- Form generation — Auto-generate forms from schema definitions
- Documentation — Schema serves as living documentation for data structures
Supported Keywords
type
Specifies the data type:
string, number, integer, boolean, array, object, or null.required
An array of property names that must be present in an object.
properties
Defines schemas for individual properties of an object.
items
Defines the schema for items in an array.
minimum / maximum
Sets the allowed range for numeric values (inclusive).
minLength / maxLength
Constrains the length of string values.
enum
Restricts a value to a fixed set of allowed values.
pattern
Validates a string against a regular expression pattern.
minItems / maxItems
Constrains the number of items in an array.
format
Semantic validation for strings:
email and uri are supported.Common Patterns
Here are some useful schema patterns you can use as starting points:
- Optional with default: Omit the field from
requiredand handle defaults in your application. - Nullable fields: Use
"type": ["string", "null"]to allow null values (array type not validated in this tool; use separate checks). - Nested objects: Put a full schema inside
propertiesto validate deeply nested structures. - Typed arrays: Use
"items": { "type": "string" }to ensure all array elements match. - String formats: Use
"format": "email"or"format": "uri"for common validations.