JSON β TypeScript
Convert JSON to TypeScript interfaces or types instantly. Paste any API response and get clean, nested, copy-ready TypeScript definitions. Runs fully in your browser, so your data never leaves your device.
TypeScript output
types.ts
export interface User {
id: number;
name: string;
role: string;
available: boolean;
skills: string[];
settings: Settings;
projects: Project[];
}
export interface Settings {
theme: string;
notifications: boolean;
}
export interface Project {
title: string;
year: number;
live?: boolean;
url?: null;
}How to use it
- 1Paste a JSON object or API response into the input box.
- 2Set the root type name and choose interface or type.
- 3Copy the generated TypeScript definitions into your project.
About this tool
Typing API responses by hand is slow and error-prone. This converter walks your JSON, creates a named interface for every nested object, merges array items so fields that are sometimes missing become optional, and handles null values as union types.
Conversion happens entirely in your browser, so it's safe to use with private API payloads.
Built by Biju Dey, a React Native developer. Need help with your app? Let's talk.