JSON Schema Generator & Validator

Infer a draft-07 JSON Schema from sample data, then validate JSON against it — all in-browser.

Generate a draft-07 JSON Schema from sample JSON, then validate JSON against it. Free, private, in-browser JSON to schema generator and validator — nothing…

About JSON Schema Generator & Validator

JSON Schema Generator & Validator is a free, browser-based dev tool with two modes: "Generate from JSON" infers a draft-07 JSON Schema from a sample JSON object, and "Validate against schema" checks any JSON document against a schema and lists every error. Inference runs locally with a built-in inferSchema function, and validation uses Ajv (MIT), loaded on demand in your browser — so nothing is uploaded and there is no signup. Use it to bootstrap a schema from example data, then confirm real payloads conform before shipping them to an API.

How to use JSON Schema Generator & Validator

  1. Pick a mode with the toggle at the top: 'Generate from JSON' or 'Validate against schema'.
  2. In Generate mode, paste a representative sample into the 'Sample JSON' box (a richer sample yields a more accurate schema).
  3. Click 'Generate schema' to produce a draft-07 JSON Schema, then use the copy button to grab it — it is also handed off to the Validate tab automatically.
  4. Switch to 'Validate against schema' and paste (or reuse) a schema on the left and the JSON to check on the right.
  5. Click 'Validate' to see a Valid/Invalid result, an error count, and a list of validation errors with their JSON paths.

Frequently asked questions

Is my JSON or schema uploaded to a server?
No. Schemas are inferred and JSON is validated entirely in your browser tab — no data leaves your device, and nothing is uploaded.
Is it free and do I need an account?
Yes, it's completely free with no signup, account, or limits.
Which JSON Schema draft does it generate and validate?
Generation produces a draft-07 JSON Schema. Validation uses Ajv with strict mode off, so it can compile and check draft-07 schemas as well as many other valid schemas you paste in.
How does it report validation errors?
It shows a Valid or Invalid result plus an error count, and lists each failure with its JSON path (instancePath) and message, e.g. the field and what went wrong. Ajv is configured with allErrors, so it reports every problem at once rather than stopping at the first.
Do I have to copy the generated schema over to validate?
No. When you generate a schema it is automatically copied into the schema box on the Validate tab, so you can paste your data and validate immediately.
Why is my generated schema looser or stricter than expected?
The schema is inferred only from the sample you provide, so the richer and more representative your sample, the more accurate the result. If a field is optional or can vary, include examples that cover those cases or edit the generated schema before validating.

People also search for

JSON Schema Generator & Validator is also known as json schema generator, json to schema generator, generate json schema from json, validate json against schema, draft-07 schema generator, how to create json schema, json schema validator online.