Zase

JSON to Types

Turn a JSON sample into TypeScript, Go or Python types.

Get it in Chrome

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.

Add to Chrome

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

  1. Paste a representative JSON sample.
  2. Pick the target language: TypeScript, Go or Python.
  3. 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.