What the generator gives you — and what it doesn’t
Hand-writing JSON Schema for a large object is tedious and error-prone. This tool reads your sample JSON and emits a matching schema: correct types, nested objects, arrays, and detected string formats (email, URI, date-time, UUID, IPv4/6). That’s the structural skeleton — typically 80% of the work. What it can’t infer from a single sample are the things data alone doesn’t reveal:
| Captured automatically | You add by hand |
|---|---|
| Types and nesting | Which fields are optional |
| Detected string formats | Value constraints (min/max, enum, pattern) |
| Array element shapes | Cross-field rules and descriptions |
additionalProperties posture | Custom error semantics |
Picking a draft version
JSON Schema has evolved through several drafts, and the right choice depends on your toolchain:
- Draft 2020-12 — newest and most capable; use it for new projects and OpenAPI 3.1 (which uses it natively).
- Draft 07 — the most broadly supported across libraries; the safe default if you’re unsure your tools support 2020-12.
- Draft 04 — legacy, but still required by OpenAPI 3.0’s schema subset.
The structural output is similar across versions; the main differences are the $schema URI and the availability of newer keywords.
Strict or lenient: additionalProperties
One decision shapes how forgiving your schema is. With "additionalProperties": false, an object must contain only the listed properties — any extra key fails validation, which catches typos and unexpected fields. Left at the default (true), extra properties are allowed, which suits extensible or evolving data. Use false for strict API contracts and config files where surprises are bugs; use the lenient default when forward-compatibility matters more than strictness.
Where the schema earns its keep
A finished schema is reusable across your stack: validate API requests and responses (Ajv and friends), auto-generate forms (React JSON Schema Form), validate config files (VS Code reads $schema), and document your data model in one authoritative place. Generate the shape here, harden it with constraints, and it becomes a single source of truth that keeps producers and consumers honest.