Nested Interfaces
Objects inside objects each get their own named interface, so the output reads like code you would write.
Paste any JSON and get clean TypeScript interfaces or types right away. Nested objects become their own interfaces and arrays are merged into one shape. Free, no signup, runs in your browser.
Drop in an API response or any JSON object on the left. The types build as you type.
Name the root type, pick interface or type, and toggle export and readonly to fit your code.
Copy the generated TypeScript or download it as a .ts file and drop it into your project.
When you wire up a new API, the tedious part is writing the TypeScript to match. You copy a sample response, then type out every field, guess at the right types, and chase down the nested objects. Miss one and the compiler complains, or worse, it does not and you get a runtime surprise. A converter does that grunt work in a second.
Paste a JSON object and this tool walks the whole structure and writes the matching interfaces. Nested objects become their own named interfaces instead of one giant inline blob, so the result is easy to read and reuse. Arrays of objects are merged into a single shape, and if a key only appears in some items it is marked optional with a question mark. Mixed types turn into a union, and identical shapes are reused instead of duplicated.
You control the output too. Name the root type, switch between interface and type, and toggle the export keyword or readonly fields to match your house style. It all runs in your browser, so even private API payloads stay on your machine.
Objects inside objects each get their own named interface, so the output reads like code you would write.
Arrays of objects are merged into a single shape, and keys missing from some items are marked optional.
Mixed value types become a union, and nullable or missing fields are handled so the types actually compile.
Choose interface or type alias, add the export keyword, and make fields readonly with one click.
Types regenerate as you type or change a setting, with copy and a .ts download ready.
Your JSON is parsed on your device. Nothing is uploaded, which keeps private payloads private.
More Developer tools you might find useful.
Common questions about converting JSON to TypeScript.