Generate a JSON Schema from sample data
Paste any JSON document and get a ready-to-use Draft-07 or 2020-12 JSON Schema in one click — inferred types, required fields, and optional strict additionalProperties: false enforcement. Nothing you paste ever leaves your browser.
Why generate a schema instead of writing one by hand
Hand-writing JSON Schema is tedious and error-prone. Inferring it from a real example gets you a working starting point in seconds.
required arrays and strict additionalProperties: false enforcement to match how strict you need validation to be.Frequently asked questions
What is JSON Schema?
JSON Schema is a vocabulary that lets you annotate and validate JSON documents. It describes the shape of your data — property types, which fields are required, allowed value ranges, and more — so tools and APIs can validate incoming data automatically.
Is the generated schema a guess or a strict definition?
It's inferred from the sample you provide, so it reflects only the types and fields present in that sample. Review the output and adjust it if your real data has optional fields, wider type ranges, or nested variations not present in the sample.
What's the difference between Draft-07 and 2020-12?
Draft-07 is the most widely supported version across validators and tooling. 2020-12 is the newer JSON Schema specification with refinements to keywords like items and prefixItems for tuple validation. Pick whichever your validator or framework expects.
Does marking fields as required affect optional data?
When enabled, every property found in an object in your sample is added to that object's required array. If your real-world data sometimes omits a field, uncheck this option or manually remove that field name from the required array afterward.