About JSON Schema Validator
Validate JSON against a JSON Schema. Paste the schema and the sample; get a list of errors with the exact path and constraint violated. Supports draft-07 keywords (type, properties, required, items, enum, pattern, minLength, maxLength, minimum, maximum, ...). Useful for testing API contracts, config validation, and data pipeline gates.
Where JSON Schema fits
A schema is a contract. Producers commit to producing JSON that matches; consumers verify on receipt. Used for:
- API request/response validation (OpenAPI uses JSON Schema)
- Config files (Kubernetes manifests, GitHub Actions YAML)
- Database column shapes (Postgres
jsonbconstraints) - Test fixtures (validating sample data matches expectations)
When the schema is shared, both sides can iterate independently while preserving compatibility.
What this validator does
- Parses the schema for syntax.
- Parses the sample for syntax.
- Walks the sample against the schema, recording every constraint violation.
- Renders a sortable error list with paths.
Common errors:
- Missing required field —
requireddeclared a key that is absent - Wrong type —
type: "string"but value is a number - Out of range —
maximum: 100but value is 1000 - Pattern mismatch —
pattern: "^https"but value starts withhttp:// - Enum violation — value not in
enum: [...]
Common workflows
Validate an API contract. Paste your service’s response schema and a real response. Pass → contract holds. Fail → fix one side.
Audit a Kubernetes manifest. k8s schemas are public. Pull the schema for Deployment, validate your manifest against it before applying.
Test a data pipeline. Schema-validate every record at ingestion. Reject broken records loudly, not silently.
Verify form output. Front-end serializes form to JSON, validate against schema before submit. Cleaner errors than backend rejection.
Why local validation
Schemas often describe sensitive shapes — internal API contracts, credit card processors, auth tokens. Validating remotely leaks those shapes. Browser-side keeps the schema and sample local.
Frequently asked questions
Which draft is supported?
$dynamicRef, prefixItems) work in toggle mode.Why use JSON Schema over Zod / Yup?
How are errors reported?
/users/0/email), the failed keyword, and the expected vs actual values. Click an error to highlight the offending value in the source.Can I generate a schema from JSON?
Are external <code>$ref</code> URLs fetched?
#/... refs but skip external URLs to keep the validator local-only. Inline external schemas before validation.Best practice for big schemas?
$ref; bundle for runtime use. The tool validates the bundled form.Related tools
Last updated: 2025-01-15