Stop typing out types by hand
You call an API, get a big JSON response and now need types for it. Writing them by hand means reading every field, guessing which are optional and fixing typos later. It's dull work and it's easy to get wrong.
Paste the JSON and this tool writes TypeScript for you. Pick interfaces, type aliases or Zod schemas, and nested objects get their own named types.
Interface or type?
For plain object shapes, either works, and the choice is mostly taste. Interfaces can be extended and merged, which suits public APIs and class-based code. Type aliases handle unions and more complex combinations. Pick one and stay consistent across the project.
Zod output is different. A Zod schema checks data at runtime, and you can derive the TypeScript type from it. That's worth it when the data comes from outside your code, like a network call, where TypeScript alone can't protect you.
Optional fields and mixed arrays
A sample can only show you what's in the sample. If a field is missing in one object of an array, the tool marks it optional. Fields that are null are typed accordingly. Arrays that mix several types become a union.
One sample isn't proof. If the API sometimes returns a field and sometimes doesn't, paste a response that has it, or edit the output afterward. Always read the result before you ship it.
Repeated shapes and dates
When the same nested shape appears in several places, you may end up with similar types in more than one spot. Merge them by hand into one shared type if you want a tidy file.
Dates in JSON are strings. The generated type will say string, because that's what JSON carries. If you convert them to Date objects in your code, type the converted version separately, or let a Zod schema do the transform.
Strict mode
The output is written to work with strict mode, so you don't have to loosen your compiler settings to use it.
Your JSON is processed in the browser and isn't uploaded. Still, strip real tokens and personal data from samples before pasting them anywhere, out of habit.