JSON Schema Generator
About this tool
When you already have an API sample, paste it into this online JSON Schema generator to get type and properties. Use the online cURL generator when you need a curl command instead.
Features
- Infers type and properties from a sample
- Required keys follow what appeared in the sample
- You still tighten enums and formats by hand
How to use
- Paste a JSON object or array, such as a name and age sample.
- Optionally mark required fields, or disallow additional properties.
- Copy the schema into docs, validators, or codegen.
When to use it
- No official schema yet, start from a real response
- Feed a validator a first draft
- Docs need field types without listing them from scratch
Examples
- {"id":1,"name":"a"} yields integer and string properties.
- If the sample has no null, types will not become nullable on their own.
FAQ
Is the JSON uploaded?
No. Inference stays in the browser.
How is this different from the online cURL generator?
This page builds JSON Schema from JSON. The online cURL generator turns an HTTP request into a curl command.
Back to JSON Tools Hub
Guides