JSON to TypeScript.
Paste sample JSON to get a TypeScript declaration. Powered by quicktype. Runs entirely in your browser.
TypeScript
JSON → TypeScript
Idle
Loading editor…
Loading…
Frequently asked questions.
- How does this generate types?
- JSONZen ships quicktype, the same library behind quicktype.io. It walks your JSON sample, infers the narrowest type per field, and emits a TypeScript declaration.
- Does my JSON leave my browser?
- No. quicktype runs in your browser via WebAssembly / pure JS. There is no network round-trip and no server.
- My sample has missing fields — how does it model those?
- Paste multiple JSON values (one per line) and quicktype will unify them, marking absent fields as optional. Single-sample mode treats every field as required.
- Can I use this with discriminated unions?
- Yes, indirectly. quicktype detects enum-like string fields and tagged unions. The generated output uses `|` for unions where appropriate.
More JSON tools.
- FormatPretty-print JSON with line-accurate errors. Sort keys on demand.
- ValidateCheck a JSON document against a JSON Schema. Per-path error messages.
- MinifyStrip whitespace and shrink your JSON payload. Reports bytes saved.
- Tree ViewBrowse JSON as a collapsible tree. Drill into nested data without scrolling.
- Semantic DiffCompare two JSON files by structure. Per-path adds, removes, modifications.
- JSONPath / JMESPathRun live JSONPath and JMESPath queries against your JSON.