JSON Schema Generator
Writing a JSON Schema by hand for a payload you already have is backwards. Paste a real example — an API response, a config file, a fixture — and this generator infers the schema for you, ready to drop into your validation setup or OpenAPI spec.
The inference is deliberate about the details that hand-rolled generators usually get wrong. Integers and floating-point numbers are distinguished (1 becomes integer, 1.5 becomes number; a mix collapses to number). The required list only contains keys present in *every* object sample at that location, so optional fields don't accidentally become mandatory. Mixed content produces sorted type unions, or anyOf branches when objects and primitives mix at the same position. And strings that consistently match a known shape get a format hint: RFC 3339 date-time, UUID, email or URI — but only when every string at that location matches, so one oddball value doesn't poison the hint.
Output is deterministic: same input, byte-for-byte same schema, with sorted property names and a pinned $schema of draft 2020-12. Empty arrays are emitted without an items constraint rather than guessing. Once generated, switch to the Validate tab to check other documents against your new schema.
FAQ
How accurate is a generated schema?
It's an exact description of the sample you provided — nothing more. One object with three keys yields a schema requiring those three keys. Feed it several varied samples (arrays of objects work best) and the inference generalizes: optional keys drop out of required, mixed values widen into unions.
Can I edit the schema afterwards?
Absolutely — the output is meant as a starting point. Add min/max bounds, enums, patterns or descriptions by hand, then use the Validate tab to test documents against your refined schema.
Does the generator upload my sample?
No. Inference runs locally in your browser; nothing is sent anywhere.