What this tool does
Typing API responses by hand is slow and easy to get wrong. Paste a representative JSON sample and this converter infers nested interfaces, merges array item shapes and marks fields missing from some items as optional. Review the result: one sample cannot reveal every possible response shape.
How to use it
- Paste a representative JSON sample.
- Set the root interface name and options.
- Copy the generated TypeScript.
Questions
Does it call my API?
No. You paste a JSON sample; no request is made and no URL is needed.
How are arrays handled?
Object items are merged into a single interface. Primitive arrays become string[], number[] and so on; mixed values become unions.
Why are some fields optional?
A key missing from at least one object in an array is optional in the merged type, because it is not guaranteed in every item.