JSON Schema Generator
Infer a JSON Schema from a JSON sample, with types, properties and required fields.
Quick answer: enter your details below and click Generate Schema — your result appears instantly, right here in your browser. Nothing you enter is uploaded or stored.
J
Developer
Enter your details below.
How to use
- Paste your JSON sample into the box.
- Click Generate Schema.
- Copy the schema and adjust required fields and types for your real data.
About this tool
Paste a JSON sample and this tool builds a schema describing it: objects get their properties and a required list, arrays get an item type from their first element, and values get string, number, boolean or null types. Nested objects are described in place. It is a draft schema for documentation and validation, so review it before relying on it, since a single sample cannot prove which fields are truly required.
Frequently asked questions
Why is every field listed as required?
Because every field in the sample was present. A single sample cannot tell which fields are optional, so review the required list yourself.
What type does an empty array get?
Just array, with no items type, since there is no element to learn from.