JSON Schema Generator
Generate a JSON Schema from sample JSON: types, nested objects, arrays, required keys and formats like email, date-time and URI. Draft 2020-12 or Draft-07.
Tool
About this tool
About JSON Schema Generator
Paste an example of your JSON – an API response, a config file or a database record – and get a JSON Schema that describes it. Nested objects and arrays are handled, list items with different shapes are merged, keys present in every item become required, and common formats (email, date, date-time, URI, UUID, IPv4) are detected. Use the schema to validate data, document an API or generate forms.
How it works
Example
How to use this tool
- Paste your JSON or choose a .json file.
- Pick the schema version and options.
- Copy or download the schema.
Frequently asked questions
Which draft should I choose?
Draft 2020-12 is the latest. Choose Draft-07 if your validator or tool is older – it is the most widely supported.
Will it guess my business rules?
No – it describes the shape of the sample. Add minimums, maximums, patterns and enums yourself.
Is my data uploaded?
No. Everything is processed in your browser and stays on your device.
Does the JSON Schema Generator send my data to a server?
No. The JSON Schema Generator runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.