100% client-side · no sign-up

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.

Draft
Title
Sample JSON
Ready
Generated Schema

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.

Instant inference
Paste any JSON and get types, nested objects, and array item shapes converted to schema in one click — no manual keyword lookup.
📋
Draft-07 or 2020-12
Choose the specification version your validator or framework expects — both are widely supported across tooling.
Required fields & strict mode
Toggle automatic required arrays and strict additionalProperties: false enforcement to match how strict you need validation to be.
🔒
100% client-side
Schema generation runs entirely in your browser. Your sample data is never uploaded or stored on a server.

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.

More JSON tools