JSON Schema Generator
Paste a sample JSON value to generate a matching JSON Schema (draft-07) — types, nested objects, arrays, and required fields inferred from what's present.
How to use it
Paste a representative JSON sample and click Generate. Numbers without a decimal point are typed as integer; every key observed on an object is listed under required, since a single sample can't tell which fields are truly optional. Check the result against your JSON Schema Validator if you're not sure it's valid.
Frequently Asked Questions
What if an array has mixed element types?
The generated items schema becomes an anyOf listing each distinct element schema observed.
Why are all my object fields marked required?
Inference works from a single sample, so every key that was present in your input is included in required. Remove any that are actually optional by hand.
Which JSON Schema draft does this target?
Draft-07 ($schema: "http://json-schema.org/draft-07/schema#"), the version most widely supported by validators and code generators.