No file open
Create a new file or open an existing one from the sidebar
Paste a JSON sample and press Generate Types in the Convert panel.
No file open
Create a new file or open an existing one from the sidebar
To generate TypeScript types from JSON, paste a sample above, open Convert and press Generate Types. The interfaces open in a new tab, ready to copy into your project.
Every nested object gets its own exported interface named after its key, and arrays of objects are merged, so a key that only some items have becomes optional. Mixed values turn into unions like string | null, keys that aren't valid identifiers are quoted, and identical shapes share one interface.
{
"page": 1,
"users": [
{
"id": 1,
"name": "Ada",
"email": "ada@example.com",
"last-login": "2026-10-01T09:30:00Z",
"team": {
"id": 7,
"name": "Platform"
}
},
{
"id": 2,
"name": "Linus",
"email": null,
"team": {
"id": 7,
"name": "Platform"
}
}
]
}export interface Root {
page: number;
users: User[];
}
export interface User {
id: number;
name: string;
email: string | null;
"last-login"?: string;
team: Team;
}
export interface Team {
id: number;
name: string;
}As accurate as your sample. The generator only knows what it can see, so if a field can be null but never is in your sample, the type won't include null. A response with a few varied items gives the best result.
After their keys. Array items use the singular, so users gives you a User interface, and when there's no obvious singular, Item is added to the name.
Not yet, it generates TypeScript interfaces and type aliases.
No, this runs entirely in your browser, so nothing you paste is sent to a server. The only feature that sends data anywhere is the optional AI assistant, and only when you actually ask it something.