Infer a JSON Schema (draft-07) from a JSON sample: types, required, formats and enums.
Paste or type your input here, JSON Schema Generator is loading…
JSON Schema Generator reads a sample JSON document and infers a draft-07 JSON Schema that describes it: the type of every value, nested objects, and a single item schema for arrays built by merging the shapes of their elements.
Two options make the result more precise. Format detection recognises strings that look like an email, a URI, a date-time or a UUID, and enum detection turns a field with only a few distinct values into a list of allowed values. You also choose whether every property is required, or only the properties that appear in every item of your sample.
The schema can only describe what the sample shows, so give it an example that includes every optional field. Use the required-only-if-present-everywhere setting when your sample array contains items with optional fields.
Treat the output as a strong first draft: it gets the structure right in seconds, and you then tighten it by hand with minimum and maximum values, patterns or descriptions. Copy or download the schema when you are done.
| Price | Free, no signup, no paywall, no watermark |
|---|---|
| Works on | Any modern browser: desktop, tablet, and mobile |
| Processing | In your browser, files never leave your device |
| Account required | None |
| Category | Developer Tools |
Paste a representative JSON sample
Choose format-detection and required-field options
Copy or download the inferred draft-07 schema
Infer a draft-07 JSON Schema from any JSON sample
Detects types, nested objects, and merges array element shapes into one item schema
Optional string format detection (email, uri, date-time, uuid) and enums for small value sets
Choose whether all properties are required or only those present in every sample
Copy or download the generated schema
Bootstrapping a JSON Schema for API request/response validation
Documenting the shape of a JSON payload
Generating validation rules from an example object
Seeding a schema you then refine by hand
Provide a sample that includes every optional field so they appear in the schema.
Use 'required only if present in all items' when your sample array has optional fields.
Common questions about this tool, its workflow, and what to expect before you use it.
No ratings yet. Be the first to say how JSON Schema Generator worked for you.
Reviews appear here once our team has read them, so everything you see is from someone who signed in and used the tool.
Get notified about new tools, features, and tips. No spam, unsubscribe anytime.
Semantic, order-independent diff of two JSON documents: added, removed and changed values by path.
Try itGenerate realistic fake JSON, CSV or SQL test data from a simple field schema: names, emails, dates, UUIDs and more.
Try itBuild cURL commands from a request and convert them to fetch or axios code, and parse cURL back.
Try itBeautify, minify, sort, repair and validate JSON with precise error location, a collapsible tree view and path queries.
Try itUTF-8-safe Base64 encode & decode with a URL-safe variant, line-wrapping and file-to-Base64 (data URI).
Try itEncode and decode URLs and components, with a live breakdown of query parameters.
Try itDecode and inspect a JWT's header, payload and claims with human-readable timestamps and live expiry status.
Try itGenerate MD5, SHA-1, SHA-256, SHA-384, SHA-512 and HMAC digests for text or files.
Try itWriting a roundup or tutorial? Embed the live JSON Schema Generator so readers use it right on your page, or drop in a ready-made card that links to it. Free to use, always.
Preview
Infer a JSON Schema (draft-07) from a JSON sample: types, required, formats and enums.
Use JSON Schema Generator free →Live tool (iframe)
Readers use the real, working tool right on your page, with a small credit line underneath.
Embed card (HTML)