JSON Schema basics
JSON Schema describes the expected shape of JSON data. This generator creates a Draft 2020-12 schema from an example object, array or primitive value.
properties
Object keys become entries in properties. Nested objects receive their own nested properties definitions.
required
When Required fields is enabled, properties present in the inferred model are listed in required. Fields missing from some objects in an example array are treated as optional.
arrays
Arrays use an items schema inferred from their contents. Mixed arrays use anyOf where multiple value types are present.
format detection
Format detection is conservative and recognizes common string formats such as email, URI, date, date-time, IPv4 and IPv6. It avoids broad guesses that would create false positives.
limitations of schema inference
A single JSON example cannot prove constraints like minimum length, maximum length, numeric ranges or complete enum sets. This generator avoids inventing those constraints.
privacy
This JSON Schema generator runs in browser memory. It does not make an Ajax request, store your JSON in localStorage, or write your input to Laravel logs, sessions, cookies or a database.
FAQ
Does this JSON Schema generator upload my JSON?
No. Schema generation happens locally in your browser.
Which JSON Schema draft is generated?
The output uses Draft 2020-12.
Does it infer every validation rule?
No. It infers type and structure, but avoids constraints that cannot be proven from one example.