JSON Schema Generator
Paste JSON to generate a JSON Schema. Keys present in every object sample become required, and array items are merged into one schema.
Paste JSON to generate a JSON Schema. Keys present in every object sample become required, and array items are merged into one schema.
Paste a JSON sample and get a JSON Schema back. Each object key becomes a property with its inferred type, nested objects and arrays are described recursively, and the array of items is merged so one schema covers every element. The output is a complete schema document with a $schema declaration, ready to drop into a validator.
Writing a JSON Schema by hand from an example payload is slow and easy to get wrong. Generate a starting schema from a real response in seconds, then tighten it - add formats, patterns, or bounds - instead of starting from a blank file. It's handy for documenting an API, validating config files, or seeding an OpenAPI definition.
Whole numbers map to integer, decimals to number, and the usual string, boolean, and null types are detected directly. When a field shows more than one type across samples, the schema lists them as an array of types. A property is marked required only when it appears in every object sample, so optional keys in a list of records stay optional. Turn off the required toggle if you want a looser schema.