DEVELOPER TOOL

JSON Schema Generator

Infer a Draft 2020-12 schema from JSON examples, with observed required fields, nullable values and explicit settings.

Runs locallyRuns locally in your browser. Your data is not uploaded.
JSON / example to schema

Example

Draft 2020-12

Infer a starting schema, not a guarantee of your complete data contract.

Infer structure from evidence.

Paste a JSON example and generate a Draft 2020-12 schema. Object fields observed in every corresponding sample become required. Arrays combine all observed item types; object items merge their fields, so absent fields become optional. Null is a real type; a null-only sample never invents another type.

Keep the contract open by default.

Additional properties are allowed unless you uncheck that setting. Empty arrays have unconstrained items because there is no evidence for a type. Empty objects have no inferred properties. No enum, minimum, maximum or string-length constraints are invented.

Conservative formats and numbers.

Optional format inference detects calendar-valid YYYY-MM-DD dates and UUIDs only when all observed strings agree. It is off by default. Formats are annotations unless your consumer enables format validation. Integer versus number follows exact decimal meaning, including exponent notation and large values, without rounding the sample.

Review before adopting.

Examples cannot prove your complete API contract. Duplicate keys are rejected as ambiguous. Input is limited to 32 KiB UTF-8, 64 nesting levels and 20,000 values; schema output to 512 KiB. Exponents longer than 1,024 characters are rejected. Input, titles and schemas remain in browser memory and clear on Reset or navigation. Copy/download creates an explicit local copy.

Find a tool or category

Tools & categories12 results