Also available in the Chrome extension Every Zase tool also lives in the free Developer Toolkit by Zase extension: fully offline, in a window or the side panel, one keyboard shortcut away.
About this JSON to Types
JSON to Types reads a sample JSON document and generates matching type definitions: TypeScript interfaces, Go structs or Python dataclasses. Paste a real API response and skip the tedious part of typing out every field by hand.
How to use the JSON to Types
- Paste a representative JSON sample.
- Pick the target language: TypeScript, Go or Python.
- Copy the generated types and rename the root type to fit your project.
Good to know
- Nested objects become their own named types, and arrays take the shape of their items.
- Optional looking fields and mixed arrays are worth a review pass before you commit the types.
- Works best with a complete sample: the types can only describe what the JSON shows.