JSON Schema Validator — Draft-07 Paths & Local
Validate JSON against a JSON Schema (draft-07) in your browser. Steps: paste Schema and instance, validate, then read JSON Pointer paths for each failure. Example: a product object missing price fails with a missingProperty path. Paste stays in the tab — Ajv loads from a CDN as library code only.
Validator engine: Ajv 8 · JSON Schema draft-07 (default).
How it works
Paste a JSON Schema on the left and an instance on the right. Validation compiles the Schema with Ajv (draft-07), runs the instance, and lists every error with a JSON Pointer into the instance. Failing and valid samples are one click away; the page loads a failing sample on entry so you see real paths immediately.
Rules you should expect
What Ajv does on this page: parse → compile draft-07 Schema → validate instance → emit Pointer paths for each error.
- Parse: both panels must be JSON.parse-able. Schema compile errors and instance syntax errors are shown separately from validation failures.
- Validate: Ajv allErrors collects every failure (not only the first). Each line is instancePath + message (+ missingProperty when relevant).
- Draft: default dialect is draft-07. Do not assume 2020-12 vocabulary keywords work here.
- Privacy: paste stays in the tab. CDN fetch loads Ajv code only — it is not an upload of your Schema or instance.
Example
Schema requires sku (string) and price (number ≥ 0). Valid instance: {"sku":"A-1","price":9.5}. Failing instance: {"sku":"A-1"} — validation reports a missingProperty for price at the object root (shown as / with the missing key in params).
Good fits
- AI / agents: check whether model structured JSON is missing fields before you trust it in a pipeline.
- Commerce feeds: validate product JSON against a Schema before import or syndication.
- API debugging: paste a request/response body against a Schema fragment extracted from your contract.
Frequently asked questions
Why did validation fail?
Common causes: missing required keys, wrong types, or additionalProperties:false rejecting extras. Read the JSON Pointer line and the keyword message.
How do I read a JSON Pointer error?
instancePath is a JSON Pointer into the instance (empty path shows as /). For missing required properties Ajv also lists missingProperty in params.
Which draft does this page use?
This page uses Ajv’s draft-07 dialect by default. Newer drafts (2019-09 / 2020-12) need different Ajv builds and are not selected here.
Does my JSON leave the browser?
Your Schema and JSON text are not uploaded. Loading Ajv from a CDN only downloads library code, not your paste.
How do I check LLM structured output?
Paste the Schema and the model JSON, validate, then fix each Pointer path until the status shows pass — useful before sending structured output downstream.
Questions or feedback
Something unclear, broken, or missing? Draft a message below — we read every note about these tools.