How to use the Validate JSON Against a Schema
- 1 Drop the JSON document on the studio, or try the example.
- 2 Paste the JSON Schema into the step (or choose a schema file under More options).
- 3 Read the list of problems: the path, the rule that failed and a message.
- 4 Fix the JSON or the schema and the list updates as you type.
All errors, with paths
Validation stops at the first error in many tools. This one lists every violation – up to the maximum you set – with its path in the document ($.roles.1), the rule that was broken (type, required, minimum, additionalProperties) and a message. You fix the document once, not once per run.
Schema versions
The version is taken from the schema’s $schema keyword; you can also choose draft-07, 2019-09 or 2020-12. The validation is done by Ajv, a widely used validator, running in your browser. The schema language itself is defined on json-schema.org.
What is not checked
- Format keywords such as
email,date-timeoruriare annotations only here; they are not enforced. Usepatternif you need a check. - References to other documents on the internet (
$refwith a URL) are not fetched – the studio makes no requests for you. A schema that needs them is reported as unusable; inline the definitions with$defs. - Draft-04 and earlier schemas are not supported.
Numbers
Numbers beyond what JavaScript can hold exactly are validated by their numeric value. Syntax errors in the JSON or the schema are reported with the line and column.
Limits
This page validates one document at a time against one schema; to check the JSON’s syntax and layout only, use the JSON formatter.
Frequently asked questions
Are my data and schema sent anywhere?
No. Both are processed in your browser. The validator does not fetch remote schemas either.
Which JSON Schema versions work?
Draft-07, 2019-09 and 2020-12. Schemas for draft-04 and older are reported as unsupported.
Why is my email format not flagged?
Format keywords are not enforced. Add a pattern to the schema if you need the check.
Last updated: