How schema validation actually works here
This tool compiles your JSON Schema into a validation function using Ajv (Another JSON Schema Validator), the same library behind millions of production configs in webpack, ESLint, and VS Code. It supports JSON Schema draft-07 with format validation via ajv-formats -- meaning keywords like "format": "email" or "format": "uri" are enforced, not silently ignored. When validation fails, each error includes the exact instance path (e.g., /orders/0/price) and a human-readable message, so you can pinpoint the offending value without manually tracing nested structures.
Step by step
- 1Paste or type your JSON data in the top editor pane.
- 2Paste your JSON Schema (
draft-07) in the bottom editor pane. The$schemakeyword is optional but recommended. - 3Click Validate.
Ajvcompiles the schema, runs the data through it, and reports all errors at once (allErrorsmode). - 4If validation fails, each error shows the instance path and what went wrong -- fix and re-validate.
Under the hood
- `draft-07` compliance — Supports the full
draft-07keyword set:properties,required,additionalProperties,oneOf,anyOf,allOf,if/then/else,$ref(local),const,enum, and more. - Format enforcement — The
ajv-formatsplugin is loaded automatically, so formats likeemail,uri,date-time,ipv4,ipv6, andregexare validated -- not just accepted as decoration. - All-errors mode —
Ajvruns withallErrors: true, meaning it does not bail on the first failure. You see every violation in a single pass. - Instance-path error locations — Each error includes the JSON Pointer path to the exact node that failed (e.g.,
/items/2/quantity), making deep-structure debugging tractable. - Dynamic import —
Ajvandajv-formatsare loaded on demand when you click Validate -- they are not part of the initial page bundle.
Where this fits in a workflow
- API contract testing — Paste an API response alongside your OpenAPI-derived schema to verify the response shape before writing integration tests.
- Config file auditing — Validate CI/CD configs,
package.jsonfields, or infrastructure-as-code payloads against their published schemas. - Schema authoring feedback loop — Write a schema, paste sample data, iterate until the constraints are tight enough without rejecting valid inputs.
- Migration verification — After transforming data between formats, confirm the output still conforms to the target schema.
Validation example
// Schema (draft-07):
{
"type": "object",
"required": ["name", "age"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"age": { "type": "integer", "minimum": 0 },
"email": { "type": "string", "format": "email" }
}
}
// Data:
{ "name": "", "age": -5, "email": "not-an-email" }
// Errors reported:
// /name: must NOT have fewer than 1 characters
// /age: must be >= 0
// /email: must match format "email"Technical questions
Which JSON Schema drafts are supported?
The tool loads Ajv configured for draft-07, which is the most widely used draft. draft-04 schemas often work since draft-07 is largely backward-compatible, but draft-2019-09 and draft-2020-12 keywords (like $dynamicRef or prefixItems) are not supported.
Does $ref resolution work?
Local $ref pointers within the same schema document (e.g., "#/definitions/Address") are resolved by Ajv during compilation. Remote $ref URIs are not fetched -- the tool runs entirely client-side with no network calls.
Is my data sent anywhere?
No. Both the schema compilation and the validation run in your browser via dynamic import. There are no server requests, no telemetry, no logging.
Why does "format" validation fail when other tools ignore it?
Many validators treat format as an annotation-only keyword by default (per the spec). This tool loads ajv-formats explicitly so format checks are enforced, giving you stricter validation.