jsontoolskit.org
JSON and JSON Schema utilities, in the browser
Say hi →

JSON Schema Generator

draft 2020-12 default · email / uri / date-time / uuid / ipv4 detection

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

  1. Paste your sample JSON. Add more samples with + Add example — the schema generalizes across all of them.
  2. Pick Draft: 2020-12 (default), 2019-09, 07, 06, 04.
  3. Pick Verbosity:
    • Strictrequired, additionalProperties: false, enum for repeated strings.
    • Loose — required only for keys present in every example, no additionalProperties.
  4. The schema appears in the right panel. Copy or Download.
  5. 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.