Free developer tool · runs in your browser
JSON to TypeScript interfaces and Zod schemas.
Paste a real response and get the types for it: TypeScript interfaces for your editor, and a Zod schema that checks the same shape at runtime, for API responses and for the structured output of an LLM. Nothing is uploaded.
What this tool does
Types from the data you actually receive.
01
Array items merged into one type
Every element of an array is read, not just the first, and merged into one type. A key present in some items and not others becomes optional; a field that is an object in one item and null in another becomes a union.
02
Nested types, named for you
Each nested object becomes its own named type: orders gives Order, customer gives Customer. Identical shapes share one type, and a clashing name takes its parent’s as a prefix. Choose interface or type, and the root name.
03
Zod for runtime checks and LLM output
TypeScript types vanish at runtime; a Zod schema does not. Use it to validate an API response before you trust it, or to define the structured output you ask a model for: the OpenAI SDK accepts a Zod schema for exactly that.
FAQs · JSON to TypeScript
JSON to TypeScript and Zod · frequently asked questions
Optional keys, unions, Zod versions and LLM output.
Next step
Typing an API end to end?
QalbIT builds TypeScript backends and front ends that share one set of types, from the database to the screen, so a renamed field is a compile error rather than a bug report.
More free tools
More free tools
Each one opens on a worked example and shows its answer without a signup.
All free toolsJSON formatter, validator & minifier
Minify, format and validate JSON with exact error positions. Nothing is uploaded.
JSON viewer
Read JSON as a collapsible tree, search keys and values, and copy any node’s JSONPath.
JSON compare
Diff two JSON documents by value: key order and whitespace ignored, every change with its path.
JSON to CSV converter
Flatten an array of JSON objects into CSV with dot-path columns, preview it and download.
JSON Schema validator and generator
Validate JSON against a 2020-12 or draft-07 schema with each error’s path, or generate one.
Software development cost calculator
A typical cost and timeline range for your project, by type, scope and features.
