JSON Schema Generator
Paste sample JSON, get a JSON Schema. The default is draft 2020-12 with strict required / additionalProperties:false; switch to Loose for permissive output. Format detection recognises email, URI, date, date-time, UUID, IPv4.
Paste sample JSON.
How to infer a schema
- Paste your sample JSON. Add more samples with + Add example — the schema generalizes across all of them.
- Pick Draft: 2020-12 (default), 2019-09, 07, 06, 04.
- Pick Verbosity:
- Strict —
required,additionalProperties: false,enumfor repeated strings. - Loose — required only for keys present in every example, no
additionalProperties.
- Strict —
- The schema appears in the right panel. Copy or Download.
- Try it in validator jumps to json-schema-validator with this schema and your sample pre-filled.
FAQ
Why is my schema overfit?
One example is rarely enough — the inferred schema reflects only what was seen. Add 3–5 varied samples (empty arrays, missing optional keys, null values) for a usable schema.
What about enum detection?
Strict mode collapses repeated string values into an enum when the variety is small. This is rarely what you want for free-text fields — switch to Loose to keep them as plain strings.
Will it work offline?
Yes — inference runs locally.