Validate JSON Against a Schema
Check API payloads against a JSON Schema and get precise error paths. Auto-generate a schema from sample JSON to get started quickly.
Open JSON Schema Validator with a ready-to-run example.
- A QA engineer needs to confirm that an API response matches the documented contract.
- You are writing integration tests and want to validate response shapes without writing code.
- A third-party webhook is sending payloads and you need to confirm required fields are present.
- You have a JSON Schema from an OpenAPI spec and want to test it against a real payload.
- Paste your JSON payload in the left panel and your JSON Schema in the right panel.
- Click Validate — errors are listed with their exact JSON Pointer path and a human-readable message.
- If you don't have a schema yet, paste your JSON and click Infer Schema to auto-generate a starting draft.
- Refine the schema by adding
required,format, andminimum/maximumconstraints as needed.
- Add
"additionalProperties": falseto catch unexpected fields in strict validation scenarios. - Use
"required": ["field1", "field2"]at the object level — a field being inpropertiesdoes not make it required. - JSON Schema draft-07 uses
definitions; draft 2019-09+ uses$defs. Check which version your toolchain targets. - Error paths use JSON Pointer notation:
/user/0/emailmeans theemailfield of the first element in theuserarray.
User object with missing required field
{
"id": 42,
"name": "Alice"
}
{
"type": "object",
"required": ["id", "name", "email"],
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"email": { "type": "string", "format": "email" }
}
}
INVALID Error at /: must have required property 'email'
JSON Schema draft-07 and draft 2019-09 via AJV. This covers $ref, allOf, anyOf, oneOf, if/then/else, and string format validation.
Errors use JSON Pointer notation (RFC 6901). /user/0/email means the email field of the first item in the user array. Each error also includes the failing keyword and expected value.
Yes. Paste your sample JSON and click Infer Schema to generate a draft-07 compatible schema. Edit it to add required constraints, enums, and format validators before using it in production.
Privacy-first: runs locally in your browser. No uploads.