[JSONZen]

JSON to JSON Schema.

Paste sample JSON. Get a Draft 2020-12 schema you can hand-edit. Inverse of /validate.

JSON Schema

JSON → JSON Schema
Idle
Loading editor…
Loading…

Frequently asked questions.

How does this differ from /validate?
/validate checks a JSON document against a schema you wrote. This page does the opposite: it takes a sample JSON document and produces a schema you can hand-edit.
Which draft does it emit?
Draft 2020-12 by default. Switch to Draft 07 in settings for legacy tooling.
Does it detect formats like email or uuid?
Only ISO-8601 date-time strings are detected automatically. Other `format` values are an opt-in choice — open the generated schema and add them where appropriate.
How are arrays with mixed item shapes handled?
Object items are unified property-by-property, and `required` lists only the keys present in every observed item. Mixed-type items (e.g. `[1, "a"]`) are wrapped in `oneOf`.
Does my data leave my browser?
No. Inference is plain TypeScript that runs locally. No network round-trip and no server.

More JSON tools.

    JSON to JSON Schema — Free, Client-Side Generator | JSONZen