JSON Schema Generator
Turn a sample JSON object into a JSON Schema (draft-07).
About this tool
Paste a sample JSON object or array and get a matching JSON Schema (draft-07) — including nested objects, arrays, and required-field detection from arrays of objects with inconsistent keys.
Types are inferred from a single sample — if a field is sometimes a different type in other real data, double-check the generated schema. Everything runs locally in your browser.
Frequently asked questions
- How does it decide which fields are "required"?
- For a plain object, every key present is marked required. For an array of objects, a key only becomes required if it appears in every element of your sample array — keys missing from at least one element are left out of
required. - What's the difference between "integer" and "number" in the output?
- JSON Schema distinguishes whole numbers (
integer) from numbers with a decimal component (number) — this tool checks your sample value itself, so5becomesintegerbut5.0parsed from JSON also becomesinteger(JSON doesn't distinguish them at the syntax level either). - Is my JSON uploaded anywhere?
- No — parsing and schema generation both happen entirely in your browser.