About this tool
Check that a payload matches its contract before it reaches production. Paste the data and the schema, and every violation is listed with its path and underlined at the exact line. The draft is read from $schema, and the schema is interpreted locally without downloading anything.
How to use it
- Paste the JSON data on top and the JSON Schema below.
- Read the result as you type.
- Select an error to jump to that place in the data.
Example
{
"id": "7",
"plan": "enterprise"
}Line 2, column 3: $.id: Instance type "string" is invalid. Expected "integer". Line 3, column 3: $.plan: Instance does not match any of ["free","pro"].
Questions
- Which JSON Schema drafts are supported?
- Drafts 4, 7, 2019-09 and 2020-12. The draft comes from the schema's $schema keyword, and 2020-12 is used when there isn't one.
- Can my schema use $ref?
- Yes, for references inside the same schema, such as #/$defs/address. Remote references are never downloaded, so paste those definitions into the schema instead.
- Why not use Ajv?
- Ajv compiles schemas into JavaScript at runtime, which this site's security policy blocks. The validator used here interprets schemas instead, so no code is generated.