Turn any JSON payload into a Draft-07 JSON Schema.
🔒 100% client-side — your JSON is analyzed in your browser only and never sent to any server.
A JSON Schema describes the shape of a JSON document — which fields exist, what types they have, and which ones are required — so APIs, config files, and databases can be validated automatically. This generator infers a Draft-07 schema from any example JSON you paste, and it runs 100% in your browser: nothing is uploaded, so it is safe for private payloads, API responses, and production configs.
Every value in your JSON is walked recursively. Objects become type: "object" with a properties map, all observed keys listed in required, and additionalProperties: true so the schema stays permissive. Numbers are split into integer and number, and strings are tested against common formats — date-time, date, email, uri, and uuid — with the format keyword only added when the value actually matches.
Instead of describing only the first array element, the generator merges the schemas of every element. Two objects with the same fields collapse into one schema; a field that is missing from some elements drops out of required; and genuinely mixed arrays — say [1, "two", true] — become an anyOf union. For the best result, paste an example whose arrays contain several representative elements.
A generated schema is only as complete as your sample: optional fields that are absent from the example cannot be inferred, and null values are typed as null rather than their eventual type. Treat the output as a starting point — review required lists, tighten format hints, and add constraints like minimum or maxLength by hand. Finally, note that format is annotation-only in many validators unless you explicitly enable format checking.
More tools you might find useful
Convert a JSON array of objects to CSV format.
Paste JSON and generate clean, nested TypeScript interfaces instantly.
Craft signed JWTs locally — pairs with our decoder for testing.
Press any key — see key, code, keyCode, and modifiers live.