Stop writing TypeScript interfaces by hand. Paste your JSON, get production-ready TypeScript types or interfaces in seconds. Free, offline, and accurate — handles nested objects, arrays, optional fields, and more.
This tool analyses your JSON string and automatically generates the corresponding TypeScript `type` or `interface` definitions. It handles complex structures including:
Input JSON:
{
"id": 1,
"name": "Alice",
"email": "alice@example.com",
"isActive": true,
"address": {
"city": "London",
"postcode": "EC1A 1BB"
},
"tags": [
"admin",
"editor"
]
} Generated TypeScript:
interface Address {
city: string;
postcode: string;
}
interface RootObject {
id: number;
name: string;
email: string;
isActive: boolean;
address: Address;
tags: (string)[];
}