How to use the JSON Schema Validator
- Paste the schema in the schema pane (it must itself be valid JSON).
- Paste the document to check in the data pane.
- Read the error list: each entry gives the instance path, the schema keyword that failed and a message.
- Fix the data or the schema and re-check; results update as you edit.
Worked example
A record that misses a required field and breaks a minimum
Schema
{
"type": "object",
"required": ["id", "email"],
"properties": {
"id": { "type": "integer", "minimum": 1 },
"email": { "type": "string" }
}
}Data
{"id":0}Errors
(root) required must have required property 'email' /id minimum must be >= 1
Both problems are reported in one pass. Message wording varies slightly between validators; the path and keyword are what to act on.
Errors you will meet most
| Keyword | Meaning | Typical fix |
|---|---|---|
| type | Value has the wrong JSON type | "42" vs 42: send a number, or allow string |
| required | A listed key is missing | Add it, or remove it from required |
| additionalProperties | Key not declared in properties | Fix a typo or declare the key |
| enum | Value not in the allowed list | Check case and spelling |
| minimum / maximum | Number out of range | Check units and limits |
| pattern | String does not match the regex | Regex is not anchored unless it uses ^ and $ |
| oneOf | Matched zero or more than one subschema | Make branches mutually exclusive |
Why "format" may not fail
In draft 2019-09 and 2020-12, format is an annotation by default: "format": "email" describes the field but validators are not required to reject a bad email. Some validators enable format assertion as an option. If you need the check guaranteed, add a pattern as well.
Reading oneOf and anyOf errors
When a oneOf fails, a validator reports errors from every branch, which can look like a wall of unrelated messages. Find the branch that was meant to match (usually by a type or kind property) and read only its errors. If data matches two branches, oneOf also fails – use anyOf if overlap is acceptable.
Remote $ref URLs are not fetched; paste referenced definitions into $defs in the same schema.
JSON Schema Validator FAQ
What is the difference between a JSON validator and a JSON Schema validator?
A JSON validator checks syntax only: is this parseable JSON? A JSON Schema validator checks content against rules: are the right keys present with the right types and values?
Which JSON Schema drafts are supported?
Draft 2020-12 is the main target, and the $schema keyword in your schema selects the draft. Draft-07 schemas are still very common and validate with the same core keywords.
Why does my schema accept data with extra keys?
JSON Schema allows additional properties unless you set "additionalProperties": false (or unevaluatedProperties: false when combining subschemas).
How do I validate JSON Schema in code?
In JavaScript, Ajv: const validate = ajv.compile(schema); validate(data). In Python, jsonschema.validate(instance=data, schema=schema). Both report errors by path and keyword.
Does pattern need ^ and $ in JSON Schema?
Yes, if you want a full match. pattern matches anywhere in the string, so "[0-9]+" accepts "abc1". Use "^[0-9]+$" to require digits only.

