JSON to TypeScript Converter

Paste a JSON payload and get clean TypeScript interfaces as you type — nested objects, optional fields and unions included.

Updates instantly as you type

01 / Fast steps

  1. Paste your JSON (an API response works great).
  2. The TypeScript interfaces appear as you type.
  3. Copy the types into your project or download the .ts file.

02 / Best for

  • Type an API response without writing interfaces by hand.
  • Bootstrap types for config files and fixtures.
  • Keep frontend types in sync with backend payloads.

03 / Why here

  • Arrays of objects are merged intelligently: keys missing in some items become optional fields.
  • Runs entirely in your browser, so API payloads never leave your device.

04 / Keep in mind

  • Types are inferred from the sample you paste: values that can vary need a representative sample.
  • Dates and other string-encoded types are inferred as string.

faq

Questions, answered.

01How are arrays of objects handled?

All items are merged into a single interface: a key present in every item is required, a key present only in some items becomes optional, and differing value types become a union.

02Is my JSON sent anywhere?

No. The interfaces are generated locally in your browser, so real API responses and internal payloads never leave your device.

03Is JSON to TypeScript free to use?

Yes, JSON to TypeScript is completely free, with no sign-up and no usage limits. It runs entirely in your browser, so your data never leaves your device.