Eskillsfy

Home / Tools / Data and formats

JSON to TypeScript

Generate TypeScript interfaces from a JSON sample.

Runs in your browserFree, no sign-upOpens .json
Loading tool…

How to use it

  1. Paste a JSON sample or open a file.
  2. Set the name of the root interface.
  3. Copy the interfaces into your project.

About this tool

Paste a real API response and get interfaces for every nested object, with arrays typed from their items. Keys that are not valid identifiers are quoted. A quick way to type a third-party API before you write the client.

Your input is processed on your device. Nothing is sent to a server or stored.

How it works, and how to build your own →

Questions

How are null values typed?
A null value becomes `unknown | null`, because the sample does not say what the real type is. Edit it by hand once you know.
Data and formats

More tools like this

All data and formats