What is JSON Schema validation?
JSON Schema is a specification for describing the structure and constraints of JSON data. It defines expected types, required fields, value ranges, and patterns. This tool validates a JSON document against a schema definition and reports all validation errors with paths and descriptions.
What JSON Schema validation does
JSON Schema is a standard for describing the shape of JSON data — which fields are required, what type each value must be, and what ranges or patterns are allowed. Validating a document against a schema confirms it meets that contract before your code relies on it, catching malformed or unexpected data at the boundary rather than deep inside your application.
This is how APIs, configuration systems, and data pipelines enforce that the data they receive is well-formed: the schema is the specification, and validation is the automated check against it.
What a schema can require
A schema can require specific properties, restrict each to a type such as string or integer, set minimum and maximum values or lengths, constrain strings with a regular expression, limit values to an enumerated list, and describe nested objects and arrays. When a document violates any rule, validation reports which field failed and why, so you can fix the data or the schema.
Schema-first development
Writing the schema before the code turns a vague idea of a data shape into a precise, testable contract. Both sides of an API can validate against the same schema, documentation can be generated from it, and invalid data is rejected at the edge rather than causing errors deep in the system.
How to validate JSON against a schema
- 1Provide your schema. Paste the JSON Schema that describes the required shape of your data.
- 2Provide the data. Paste the JSON document you want to check against that schema.
- 3Click Validate. See whether the data conforms, with each failing field and rule listed.
Examples
A simple schema
Input
{ "type": "object", "required": ["id"], "properties": { "id": { "type": "number" } } }Output
Validates any object with a numeric id
A failing document
id must be a number.
Input
{ "id": "abc" }Output
Invalid: id should be number, got string
Common schema keywords
Rules a schema can express.
| Keyword | Constrains |
|---|---|
| type | string, number, boolean, object, array, null |
| required | Which properties must be present |
| properties | The schema of each field |
| enum | A fixed list of allowed values |
| minimum / maximum | Numeric range |
| pattern | A regex a string must match |
| items | The schema of array elements |
Frequently asked questions
What is JSON Schema for?+
It defines the required structure of JSON data so documents can be validated automatically — ensuring required fields exist and every value has the correct type before your code uses the data.
What does validation report?+
Whether the document conforms, and for each violation, which field failed and which rule it broke, so you can pinpoint the problem quickly.
Can a schema validate nested data?+
Yes. Using properties and items, a schema describes nested objects and arrays to any depth, and validation checks all of it.
Where are schemas used?+
In API request and response validation, configuration files, form validation, and data pipelines — anywhere JSON must meet a defined contract.
Is my data private?+
Yes. Both the schema and the data are validated in your browser and never uploaded.
Is it free?+
Yes — free and unlimited.
Which JSON Schema keywords are supported?+
The widely-used keywords shared across recent drafts — type, required, properties, enum, minimum and maximum, pattern, and items for nested structures.