JSON Schema Generator

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.

Sample JSON
Loading core...
Your JSON and generated schema stay in this browser. Nothing is uploaded or stored.

Examples & Usage

Multiple object samples

Fields present in every object become required; occasional fields stay optional.

Mixed arrays

Different item types are preserved with an anyOf schema.

Frequently Asked Questions

Which JSON Schema drafts are supported?

You can generate Draft 2020-12 for modern projects or Draft 7 for broad compatibility with existing tooling.

How are required fields inferred?

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.

Which string formats can be detected?

The generator detects date, time, date-time, email, URI, UUID, IPv4 and IPv6 values. Ambiguous strings remain plain strings.

Is the generated schema production-ready?

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.

Related Tools