JSON Schema
JSON Data
Paste a JSON Schema and a JSON document to check the data against common schema rules — types, required
properties, string patterns, numeric ranges, enum, const,
array constraints, and additionalProperties. Validation runs entirely in your
browser, so neither your schema nor your data is ever sent to a server.
What is JSON Schema?
JSON Schema is a vocabulary for describing the shape of a JSON document — which fields are required, what type each value must be, and the rules each value has to satisfy. Instead of writing manual checks in code, you declare the contract once and let a validator enforce it. It is widely used to validate API request and response bodies, configuration files, and form input before that data reaches your application logic.
How to validate JSON against a schema
- Paste your JSON Schema into the left panel (or pick a ready-made example from the dropdown).
- Paste the JSON data you want to check into the right panel.
- Click Validate — results update automatically as you type.
- Review each error, which shows the JSON path of the offending value and what rule it violated.
For example, this schema requires a name string and an integer
age between 0 and 150:
{
"type": "object",
"required": ["name", "age"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"age": { "type": "integer", "minimum": 0, "maximum": 150 }
}
}
When to use schema validation
- API contracts — confirm that a response matches what your client expects before you write parsing code against it.
- Configuration safety — catch a misspelled key or wrong type in a config file long before it crashes a deploy.
- Data pipelines — reject malformed records at the boundary instead of letting bad data spread downstream.
- Documentation — a schema doubles as machine-readable documentation of your data structures.
Frequently asked questions
What is the difference between a JSON validator and a JSON Schema validator?
A JSON validator checks that text is syntactically valid JSON. A JSON Schema validator goes further: it checks that valid JSON also matches a defined structure — correct types, required fields, allowed values, and so on. Use the JSON Validator for syntax and this page for structure.
Which JSON Schema keywords are supported?
This tool supports the most common keywords: type, required, properties, enum, const, minLength, maxLength, pattern, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, minItems, maxItems, uniqueItems, items, minProperties, maxProperties, and additionalProperties.
Is my schema or data sent to a server?
No. Validation runs entirely in your browser using JavaScript. You can confirm this by opening your browser network tab — no request is made while you validate.
Does it support nested objects and arrays?
Yes. The validator walks nested objects and array items recursively, and each error message includes the JSON path so you can pinpoint exactly which value failed.
How do I write a JSON Schema?
Start from one of the built-in examples, then adjust the properties and rules to match your data. For a full walkthrough with examples, read our JSON Schema validation guide.