WMCoder

JSON Schema Generator

v1.0.0

Infer JSON Schema draft-07 from sample JSON in-browser: types, nesting, arrays, enums, formats, strict/loose required. Copy—no upload.

JSON input

Turn sample JSON into a draft-07 JSON Schema in the browser—types, nesting, arrays, enums, common string formats, and strict or loose required fields—with one-click copy.

Read the full guide →

Frequently Asked Questions

What JSON Schema version does this tool use?
The output sets `$schema` to `http://json-schema.org/draft-07/schema#`. Keywords match what most draft-07 validators and editors expect; confirm against your runtime if you rely on newer drafts.
What is the difference between Strict and Loose mode?
Strict lists every property key the tool saw under `required` at each object level—good for configs and APIs where missing keys should fail validation. Loose omits `required`, so properties behave as optional—better for sparse or exploratory samples.
When does the tool emit an enum for a string field?
Inside an array of objects, when the same key appears as a string on every sampled row, the array has at least three items, and there are between one and five distinct string values, the schema uses `enum` with those values (sorted). Outside that pattern, strings stay plain `type: string`, often with `format` when a heuristic matches.
Which string formats are detected?
Heuristics may add `format` for uuid, email, date, date-time (ISO-style), uri (http/https), ipv4, and ipv6. How strictly those apply depends on your validator; treat them as hints and tighten rules in your own schema if needed.
Is my JSON sent to a server?
No. Parsing and schema generation run entirely in your browser; nothing is uploaded for this tool.