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).
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
Tools
Guides
- Semantic JSON Diff vs Text Diff: Key Order, Array Order, and Type Coercion
- Converting CSV to JSON: Where It Actually Goes Wrong
- Generating Mock JSON Data From a Schema — Seeds, Determinism, and What Gets Faked
- JSON Formatting and Validation: What Actually Trips People Up
- What "Required" Means When You Infer a JSON Schema From Samples
- JSON Schema vs Zod: They Solve Different Halves of the Same Problem
- quicktype vs Live Types: Different Jobs, Not Direct Competitors
- "Unexpected Token in JSON at Position 0" — What It Actually Means
- XML to JSON Conversion: Attributes, Mixed Text, and Why Repeated Tags Become Arrays
- Fixing Double-Encoded JSON Strings (JSON.stringify Twice)
- Detecting Breaking Changes in a JSON API Response
- JSON vs YAML for Config Files