Runs 100% in your browser — nothing uploaded

JSON Schema Validator

Validate a JSON document against a JSON Schema (draft-07) and get precise, per-error data paths — or infer a starter schema from a sample. Powered by Ajv running entirely in your browser, so your data and schema never leave the device.

JSON datainstance
JSON Schemadraft-07
Loading validator… paste data and a schema. Validation happens on this device only.

How to validate JSON against a schema

Paste the JSON you want to check into the left pane and the schema into the right pane. Validation runs as you type: a green banner confirms the document is valid, and a red panel lists every problem with the exact path to the offending value. Both panes accept large documents, and nothing is submitted — the validator is the Ajv library running in your browser. If you do not have a schema yet, paste a representative sample into the data pane and press Infer schema from data to generate a draft-07 starting point you can refine.

What a JSON Schema is

A JSON Schema is itself a JSON document that describes the shape another JSON document must take: which keys are required, the type of each value, allowed enumerations, string patterns and formats, numeric ranges, array item types and whether extra properties are permitted. Schemas are the contract behind API request bodies, configuration files and message payloads, and validating against one turns "looks right" into a deterministic pass or fail. This tool implements draft-07 — the most widely used version — through Ajv, which also understands the closely related draft-06 and draft-04 keywords.

Reading the errors

When a document fails, each error tells you three things: the data path to the value that broke the rule, such as .users[2].email; the keyword that failed, such as required, type, enum or pattern; and a readable message. Because validation reports all errors at once rather than stopping at the first, you can fix a batch of problems in one pass. A missing required property is reported on the parent object, while a wrong type or out-of-range value is reported on the value itself — knowing the difference makes the path easy to follow.

Inferring a schema from a sample

Writing a schema from scratch is tedious, so the infer button bootstraps one for you. It walks the sample, assigning a type to every value, deriving array items from the elements, and marking the keys that are present as required. The output is a faithful description of that sample — treat it as scaffolding. Real schemas usually loosen some required keys, add enum or pattern constraints, set numeric bounds and decide whether additionalProperties should be allowed. Generate, then tighten.

Why validate locally

Schemas are often validated against real payloads: production API responses, configuration holding secrets, customer records. Pasting those into an online validator means uploading them to someone else's server. Here, Ajv runs as plain JavaScript in your browser, so both the data and the schema stay on your device — the same local-only default as every gitime.dev tool — and the result is deterministic, identical to running Ajv in your own build.

Frequently asked questions

Which JSON Schema draft is supported?
Ajv 6 — JSON Schema draft-07, compatible with draft-06 and draft-04 keywords.
What do the error paths mean?
Each error shows the data path, the failed keyword and a readable message so you can jump to the fix.
Can it create a schema for me?
Yes — infer a draft-07 starter schema from a sample, then refine the constraints by hand.
Is my data uploaded?
No. Ajv runs locally, so data and schema stay on your device.

Related tools