JSON to TypeScript interface generator

Paste sample JSON to get TypeScript interfaces or types, including nested objects and arrays.

About JSON to TypeScript

Paste sample JSON from an API. Every object gets an interface named after its field (user → User). When array items don't all have the same fields, missing ones become optional (?:) and nulls become T | null.

Types are inferred from your sample only, so review them before use.

FAQ

Can I get type aliases instead?

Yes — choose “type”.

More tools here

Other tools you may like