Multiple object samples
Fields present in every object become required; occasional fields stay optional.
Turn sample JSON into a Draft 2020-12 or Draft 7 schema. Infer required fields, formats, nested objects and mixed arrays entirely in your browser.
Fields present in every object become required; occasional fields stay optional.
Different item types are preserved with an anyOf schema.
You can generate Draft 2020-12 for modern projects or Draft 7 for broad compatibility with existing tooling.
For one object, present fields are required. In an array of objects, only fields present in every sampled object are required. You can disable required inference.
The generator detects date, time, date-time, email, URI, UUID, IPv4 and IPv6 values. Ambiguous strings remain plain strings.
It is a strong structural starting point. Review it and add business constraints such as ranges, lengths, patterns, enums and additionalProperties rules before production use.