JSON Schema Generator
Local ProcessingInfer and generate Draft-07 / 2020-12 JSON Schema definitions from sample JSON documents.
How It Works & Processing Standards
Infer and generate Draft-07 / 2020-12 JSON Schema definitions from sample JSON documents.
Tool processing runs in your browser. If you create a calculator or conversion share link, its values are included in the URL. See the privacy policy for account, analytics and advertising data.
Current Limits
- Desktop max file size: 50MB
- Mobile max file size: 20MB
For when writing a schema for API docs or form validation from scratch is tedious. Types (string, integer, number, boolean, array, object) are read from the values to fill properties and required.
It is a draft from one example. Add optional fields, value ranges and formats (such as email) yourself.
What You Can Do
- Type inference
- Whole numbers become integer, decimals number, and so on.
- Required list
- Every key in the example goes into required.
How to Use JSON Schema Generator
- 1Paste example JSONPaste one representative record.
- 2Check the schemaReview the generated schema.
- 3RefineFor example, remove optional keys from required.
Examples
Common Use Cases
- Drafting API request and response schemas
- Defining form validation rules
Frequently Asked Questions (FAQ)
What about null values?
They become "type": "null". If other types are possible, change it to something like ["string", "null"].
