About JSON Schema Generator
JSON Schema is a vocabulary for describing and validating the structure of JSON documents. This tool infers a draft 2020-12 schema from one sample: objects get properties and a required list containing every key, arrays take their items schema from the first element only, and numbers are typed integer or number. It does not infer formats, enums, patterns, or length limits, so treat the result as a starting point.
How to use JSON Schema Generator
- Type or paste into the "JSON" box, or press "Use example" to try it with sample data.
- The result appears below and updates as you type.
- Copy the result with the copy button, or download it as a file where that is offered.
Questions about JSON Schema Generator
Why is every property listed as required?
A single sample cannot show which keys are optional, so the generator marks all of them as required. Remove names from the required array for any field your data may omit.
Runs in your browser. Page last updated .