JSON to JSON Schema Generator
Generate a JSON Schema from a JSON sample, inferring types, objects, arrays and required fields.
Input
Result
How to use
Generating a schema
Paste a representative JSON document and press Generate. The tool infers a type for every value, merges the items of arrays and marks each property present in the sample as required.
- Paste a JSON sample.
- Press Generate.
- Adjust required fields and descriptions in the result.
Frequently asked questions
Which schema draft is produced?
The output declares the 2020-12 dialect, which is compatible with most modern validators.
How are arrays with mixed types handled?
The items schema becomes an anyOf list covering every observed type.
Related tools
JSON Validator
Check whether your JSON is valid and see a clear explanation of any syntax problem.
JSON to TypeScript
Generate TypeScript interfaces from a JSON sample with optional and union types.
JSON Formatter
Beautify and validate JSON with configurable indentation, error highlighting and one click copy.
JSON Minifier
Remove every unnecessary space and newline to produce the smallest possible JSON payload.
JSON Viewer
Read JSON in a clean formatted view and explore it as a collapsible tree.
JSON Tree Viewer
Turn JSON into an interactive, collapsible tree with array lengths and value types.