About the JSON Schema Generator
Generate a JSON Schema from an example document instead of writing it by hand. The generator infers types for every property, distinguishes integer from number, merges all items of an array, marks properties present in every item as required and detects common string formats: date-time, date, email, uri and uuid.
Choose draft 2020-12 (the current standard, used by OpenAPI 3.1) or draft-07 for older validators.
How to use it
- Paste a representative JSON sample.
- Choose the schema draft.
- Copy the schema and refine it — add descriptions, enums or limits.
Features
- Draft 2020-12 and draft-07
- Required properties from all array items
- Format detection
- Mixed types become type arrays
Frequently asked questions
Which validators can use the schema?
Any standards-compliant validator, such as Ajv (JavaScript), jsonschema (Python) or NJsonSchema (.NET).
Is the inferred schema complete?
It reflects your sample. Add constraints the data can't show — minimum and maximum, enums, patterns and descriptions — before using it in production.
Is my data uploaded anywhere?
No. All processing happens in JavaScript inside your browser tab. Your input is never sent to a server, logged or stored, so it is safe to use with internal or sensitive data.