Developer

JSON to TypeScript

Generate TypeScript interfaces from one or many JSON examples, with optional fields, unions and reused types.

Offline prerequisites

The installed app shell does not prepare every operation. Choose the resources you need, prepare while online, then recheck before disconnecting. Downloads below are approximate bundled sizes; network transfer can differ.

This tool has no separately downloaded codec/model prerequisite in this build. Its app code must still be installed, and browser APIs, file limits and supported formats still apply.

Checking this build’s offline resources…

JSON

Tab moves to the next control. Ctrl+] or Command+] inserts a tab.

About this tool

Paste a JSON response, or a list of example records, to generate TypeScript types. Fields missing from some examples become optional, values that vary become unions, and null is kept as its own type.

Nested objects get their own named types, named after their keys, with lists of items named in the singular. Objects with the same fields are written once and reused. Choose interface or type, inline types, readonly, export and array style.

Types inferred from examples describe what the examples contain. Add examples with missing and null values to make them more precise.

esc
  • Opens in its own window, like any app
  • Works without an internet connection
  • Starts instantly from your home screen or dock

Look for the install icon at the right end of your browser’s address bar, or open the browser menu and choose Install Interformat.