JSON Schema Generator

Generate a JSON Schema from sample JSON.

Schema will appear here...

Frequently Asked Questions

What is the difference between JSON Schema Draft-07 and 2020-12? +
Draft-07 uses $schema with a draft-07 URL and is the most widely supported version. 2020-12 replaces "definitions" with "$defs" and adds features like prefixItems for tuple validation. Most validators support both.
How does format detection work? +
The tool checks string values against common patterns: email addresses, URLs (http/https), ISO 8601 dates, IPv4 and IPv6 addresses, and UUIDs. If a value matches, the corresponding format annotation is added to the schema.
Should I set additionalProperties to false? +
Setting it to false makes the schema strict, rejecting any properties not explicitly listed. This is good for API validation where you want tight control. Leave it true (or omitted) if you want the schema to be flexible.
Does this handle mixed-type arrays? +
Yes. If an array contains items of different types (like strings and numbers), the generated schema uses oneOf to list all observed types for the items.