What does this tool do?
Generate a JSON Schema automatically from a sample JSON document, with inferred types and required fields. Everything runs locally using JavaScript in your browser — nothing you paste or upload is ever sent to a server.
How to use this tool
- Paste your sample json data into the left-hand box.
- Click Generate Schema.
- Copy the generated json schema from the output box.
Frequently asked questions
Does this tool take JSON data or a JSON Schema as input?
It takes sample JSON data (an actual object, not a schema) and infers a JSON Schema that would validate documents shaped like it. To go the other direction, use the JSON Schema Validator.
How are array item types inferred?
If every item in an array is an object, their properties are merged into one item schema, with a field marked required only if it appears in every item. Otherwise, the first item's inferred type is used.
Are all properties marked required?
Yes for the top-level object and any nested objects encountered directly — every key present in the sample is marked required, since the tool can only infer from what it sees. Edit the generated required array by hand if some fields are actually optional.
