JSON Schema Validator
Validate JSON data against a JSON Schema definition.
POST
1 credit
/v1/json-schema-validate
curl -X POST "https://devtools.toolkitapi.io/v1/json-schema-validate" \
-H "Content-Type: application/json" \
-d '{
"data": {"name": "Alice", "age": 30},
"schema": {
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer", "minimum": 0}
},
"required": ["name", "age"]
}
}'
import httpx
resp = httpx.post(
"https://devtools.toolkitapi.io/v1/json-schema-validate",
json={
"data": {"name": "Alice", "age": 30},
"schema": {
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer", "minimum": 0}
},
"required": ["name", "age"]
}
},
)
print(resp.json())
const resp = await fetch("https://devtools.toolkitapi.io/v1/json-schema-validate", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"data": {"name": "Alice", "age": 30},
"schema": {
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer", "minimum": 0}
},
"required": ["name", "age"]
}
}),
});
const data = await resp.json();
console.log(data);
# See curl example
Response
200 OK
{
"valid": true
}
Try It Live
Live Demo
Response
Description
Validate JSON data against a JSON Schema definition.
How to Use
1
1. Send a POST request with `data` (the JSON object to validate) and `schema` (the JSON Schema definition).
2
2. If `valid` is `true`, the data conforms to the schema.
3
3. If `valid` is `false`, inspect `error`, `path`, and `schema_path` to locate the violation.
About This Tool
JSON Schema Validator checks whether a JSON object conforms to a given JSON Schema definition. When validation fails it returns the error message along with the exact path to the offending field.
Why Use This Tool
- API contract testing — Verify request/response payloads match expected schemas
- Form validation — Check user-submitted data against business rules
- Data pipeline QA — Ensure incoming data meets schema requirements before processing
Frequently Asked Questions
Which JSON Schema drafts are supported?
The validator uses the `jsonschema` Python library which supports Draft 4, 6, 7, 2019-09, and 2020-12.
Can I validate nested objects?
Yes. The schema is applied recursively. The `path` field in error responses shows the full path to the failing field (e.g., `["address", "zipcode"]`).
Start using JSON Schema Validator now
Get your free API key and make your first request in under a minute.