Developer 🔒 Runs in your browser — no data sent to servers

JSON to TypeScript

Turn a JSON sample into TypeScript interfaces.

Generate TypeScript Interfaces from JSON

Typing an API response by hand is slow and easy to get wrong. This page opens JSON to Types with TypeScript chosen, so a sample response becomes a set of interfaces in one step.

Example

The sample {"id": 1, "tags": ["a"], "owner": {"name": "Ada"} } gives an Owner interface with name: string and a Root interface with id: number, tags: string[] and owner: Owner.

Related tools

For runtime validation, generate a JSON Schema from the same sample. For a Go backend, see JSON to Go.

Guides