JSON Schema generator
Generate a JSON Schema from a sample JSON document, including types, nested objects and formats.
JSON Schema generator
Paste a sample JSON document — an API response, a config file, a database export — and this tool infers a JSON Schema that describes its shape: the type of every field, which ones are nested objects or arrays, and how they fit together. It's a fast way to bootstrap validation for a payload you already have, without hand-writing every property yourself.
Choose the schema draft your tooling expects: draft-07 or 2020-12. Mark every key as required, or leave the schema permissive with no required list. Disallow additional properties to catch typos and unexpected fields, or infer formats such as email, URI, UUID and date-time straight from the sample values. Turning on length and range limits adds minLength/maxLength and minimum/maximum bounds taken directly from what you pasted, and adding descriptions from field names turns "firstName" into a plain-language description automatically. When a sample has deeply nested objects, extracting definitions pulls each nested shape into its own reusable entry instead of inlining it everywhere it's used.
If you have more than one example of the same record, paste one JSON value per line and turn on merging multiple samples: the tool combines them into a single schema reflecting the union of every field and type it saw, instead of generating a schema for just the first one. The tool accepts both Windows and Unix line endings, and the tally under the output reports how many properties it detected as you type.
Everything runs locally in your browser: your JSON is never uploaded or sent to a server. Copy the generated schema, download it as a .txt file, or send the output straight back into the input to refine it further.