What this tool does
A JSON Schema is a JSON document that describes what other JSON must look like. The validator reads the draft from the schema's $schema, or from the Draft menu when there is none, resolves $ref to $defs, definitions, $anchor and $id inside the schema, and checks every keyword. It collects all errors instead of stopping at the first (up to 100). Each error has an instance path, a JSON Pointer to the value in your data; a schema path, the location of the keyword that failed; and a message such as must have required property 'id'. When anyOf or oneOf fails, the result also lists why each option failed. Problems in the schema itself, such as an invalid regex, an unknown type name or a $ref to another file, are reported separately, because they mean part of the data could not be checked. Formats are checked by default; turn Check formats off to treat format as an annotation, which is what the 2019-09 and 2020-12 specifications do unless a validator is told otherwise. If either pane is not valid JSON, you get the line and column of the syntax error first.
Example input and output
Schema:
{
"type": "object",
"required": ["id", "email"],
"properties": {
"id": { "type": "integer" },
"email": { "type": "string", "format": "email" }
}
}
Data:
{ "id": "42", "name": "Ada" }✗ 2 errors
(root) must have required property 'email'
required · #/required
/id must be an integer (got string)
type · #/properties/id/typeA missing property is reported on the object that should contain it, so its path is the parent: here the root.
Schema:
{
"type": "array",
"items": { "$ref": "#/$defs/user" },
"$defs": {
"user": {
"type": "object",
"required": ["id"],
"properties": {
"id": { "type": "integer", "minimum": 1 },
"role": { "enum": ["admin", "editor", "viewer"] }
},
"additionalProperties": false
}
}
}
Data:
[
{ "id": 1, "role": "admin" },
{ "id": 0, "role": "owner", "nickname": "bo" }
]✗ 3 errors
/1/id must be >= 1
minimum · #/$defs/user/properties/id/minimum
/1/role must be one of: "admin", "editor", "viewer"
enum · #/$defs/user/properties/role/enum
/1/nickname property 'nickname' is not allowed (additionalProperties is false)
additionalProperties · #/$defs/user/additionalPropertiesThe schema path points into $defs, where the rule actually lives, not to the $ref that led there.
Schema:
{
"$defs": {
"base": { "properties": { "id": { "type": "integer" } } }
},
"allOf": [{ "$ref": "#/$defs/base" }],
"properties": { "name": { "type": "string" } },
"unevaluatedProperties": false
}
Data:
{ "id": 1, "name": "Ada", "admin": true }✗ 1 error
/admin property 'admin' is not allowed (unevaluatedProperties is false)
unevaluatedProperties · #/unevaluatedPropertiesunevaluatedProperties sees id, which the allOf branch declared. With "additionalProperties": false instead, id would be rejected too, and DevPrix warns about exactly that.
Common errors and fixes
- "int" is not a JSON Schema type; use "integer"
- The seven types are string, number, integer, boolean, object, array and null. Names from programming languages such as int, float, bool or dict are not types, and neither is date: use "type": "string" with "format": "date".
- "required" is inside "properties", so it declares a property called "required"
- Move "required": ["id", "email"] up one level so it sits next to "properties". The older "required": true on a single property is draft-03 syntax and is ignored by every current draft.
- property 'name' is not allowed (additionalProperties is false), although allOf declares it
- additionalProperties only counts properties declared in the same schema object, not in allOf, anyOf or a $ref. Use "unevaluatedProperties": false at the top level (2019-09 and later), or repeat the properties next to additionalProperties.
- A pattern accepts values you meant to reject
- pattern is not anchored: "[0-9]{5}" matches ABC12345XYZ because it contains five digits. Add ^ and $, as in "^[0-9]{5}$", to match the whole string.
- "prefixItems" is not part of draft-07 and is ignored
- The schema is written for a different draft than the one being used. Set "$schema" to the draft you write: 2020-12 replaced the items array with prefixItems and additionalItems with items, and in draft-07 every keyword next to a $ref is ignored.
- $ref "https://example.com/address.json" points outside this schema
- DevPrix never fetches other files or URLs, so that part of the data is not checked. Copy the referenced schema into "$defs" and change the reference to "#/$defs/address".
- must match format "email", but another validator accepted the same data
- Many validators treat format as an annotation unless you enable it: Ajv needs the ajv-formats plugin and Python's jsonschema needs a FormatChecker. Turn off Check formats to see what an annotation-only validator would report.
Common use cases
- Checking an API request or response body against the schema it is supposed to follow
- Finding out why a payload fails schema validation in CI, an API gateway or a form library
- Writing and testing a schema for a JSON config file before you publish it
- Generating a starter schema from sample JSON and tightening it rule by rule
- Checking test fixtures and seed data against the schema they must match
Privacy and security notes
- The schema and the data are validated by JavaScript in this browser tab. Nothing is uploaded, and no network requests are made: even a $ref to a URL is reported instead of fetched.
- Share copies a link that carries the JSON data after the # in the URL. Browsers do not send that part to servers, but anyone you give the link to can read it, so do not share links that contain secrets.
- Before pasting production data into any online tool, remove access tokens, passwords and personal data you do not need.
Frequently asked questions
What is the difference between JSON validation and JSON Schema validation?
JSON validation checks syntax: whether the text parses at all, which is what the JSON Validator does. JSON Schema validation starts after that and checks the parsed data against rules, such as which fields are required, their types, allowed values and ranges. This tool shows syntax errors first, then schema errors.
Which JSON Schema drafts does it support?
Draft 2020-12 (the default), 2019-09 and draft-07, read from "$schema" or picked in the Draft menu. That covers $ref, $defs, $anchor, $dynamicRef and $recursiveRef, unevaluatedProperties and unevaluatedItems. Draft-06 schemas are checked with draft-07 rules; draft-04 is not supported, because its exclusiveMaximum and exclusiveMinimum are booleans.
Why does a format pass in one validator and fail in another?
Since draft 2019-09, format is an annotation by default: validators may report it without failing the data, and many only check it when you turn it on. DevPrix checks formats by default; untick Check formats to match an annotation-only validator. It checks the standard formats, including email, date-time, date, time, uri, uuid, ipv4, ipv6, hostname and regex, but not idn-hostname.
Can it follow a $ref to another file or URL?
No. References are resolved inside the schema you paste: "#", JSON Pointers such as "#/$defs/address", $anchor names and $id-based URIs declared in the same document. A reference to another file or URL is listed as a schema problem and that part is not checked. Paste the other schema into "$defs" to include it.
Can I use this instead of Ajv in CI?
Use it to debug a schema or a failing payload quickly; keep a library such as Ajv for JavaScript or jsonschema for Python in CI, so the check runs on every build. The validator passes the required tests of the official JSON Schema Test Suite for these drafts, apart from the few that load remote files, and its paths use JSON Pointer like Ajv's instancePath and schemaPath, though the message wording differs.