Skip to content We're live on Product Hunt today Upvote
install

free tools runs in this tab no account, no upload

free tool

JSON to TypeScript

What is the TypeScript interface for this JSON response?

Paste a response body and read the interfaces for it, nested ones included. It runs here, which matters when the body you are pasting came from a real endpoint.

2 interfaces Nested objects become interfaces of their own, named after the key that held them.

how to use it

  1. Paste the JSON response, body and all.
  2. Name the root interface if the default does not suit.
  3. Copy the interfaces out; nested objects become interfaces of their own.

what this page cannot do

The extension takes the payload straight off the request the page made, so you type nothing and the body is the real one - including the fields that are only present on the third response.

JSON in the panel How do I read this API response without a formatter site?