JSON Schema Generator & Validator

Generate a schema from samples

Multiple samples merge into one shape — a field only becomes optional if it's actually missing from one of them, the same inference engine behind Live Types.

Cmd/Ctrl+Enter saves the first sample to history.

Schema

Paste at least one JSON sample.

Validate data against a schema

Supports type/properties/required/items/enum, min/maxLength, pattern, minimum/maximum, and additionalProperties: false — not the full draft-07 spec (no $ref, oneOf/allOf/not).

Advertisement

Paste one or more JSON samples to generate a draft-07 JSON Schema, or paste data plus a schema to validate against it. Feeding multiple samples produces a more accurate schema than one: fields that only appear or vary in some samples are inferred as optional or nullable, based on what was actually observed rather than a guess from a single example.

Frequently asked questions

Can I generate a schema from more than one sample?
Yes, and it's better if you do — with multiple samples, a field that's only present or non-null in some of them is correctly marked optional/nullable in the schema, rather than the schema assuming every field in one sample is always required.
Does the validator support the full JSON Schema draft-07 spec?
A practical subset: type/integer, properties/required, items, enum, minLength/maxLength/pattern, minimum/maximum, and additionalProperties: false. It doesn't support $ref, oneOf/allOf/not, or format keywords — full draft-07 conformance needs the meta-schema itself.
What JSON Schema draft does the generator output?
Draft-07 — the version most widely supported by validators, code generators, and IDE tooling.
Is my JSON uploaded anywhere?
No. Generation and validation happen locally in your browser tab — nothing is sent to a server.

Read the full guide for this tool →

Related tools & guides

Part of JSON Tools: Format, Validate, Diff, Convert, and Generate Types

Advertisement