JSON Validator
Checks JSON syntax and explains any error in plain English.
Check a JSON document against a JSON Schema. Every rule it breaks is listed with the exact location in the data and the part of the schema that failed.
| Data path | Keyword | Message | Schema path |
|---|
$schema field, use the draft it names.Validation uses Ajv, the most widely used JSON Schema validator for JavaScript, loaded into your browser.
$ref is reported before any data is checked./items/2/price means the price of the third item.email, date-time, uri, ipv4, and uuid are checked, not only annotated.Schema:
{
"type": "object",
"required": ["id", "email"],
"properties": {
"id": { "type": "integer", "minimum": 1 },
"email": { "type": "string", "format": "email" }
},
"additionalProperties": false
}{"id": 7, "email": "[email protected]"} is valid.{"id": 0, "email": "ada"} has two errors: /id must be >= 1, and /email must match format "email".{"id": 7} fails with: must have required property 'email'.{"id": 7, "email": "[email protected]", "admin": true} fails with: must NOT have additional properties (admin).$ref URLs are not downloaded. Put every definition you need in the same schema, under $defs or definitions.A JSON document that describes what other JSON must look like: which keys are required, what type each value has, allowed ranges, patterns, and more. APIs and config files use it to reject bad input early.
Use the draft named in the schema's $schema field. New schemas should use 2020-12. Many older tools and editors still use draft-07.
The schema sets additionalProperties: false, so any key not listed under properties is an error. Add the key to the schema or remove it from the data.
No. The schema and data are validated in your browser.
Often used together with the JSON Schema Validator.
Checks JSON syntax and explains any error in plain English.
Shows JSON as a collapsible tree with search and copyable paths.
Checks OpenAPI 3.x and Swagger 2.0 specs for structural errors and broken $refs.