โ— converted entirely in your browser

JSON to TypeScript converter

Paste JSON, get generated TypeScript interfaces โ€” including nested objects and arrays.

How it works

The converter walks the parsed JSON recursively, mapping primitives straight to number/string/boolean/null and emitting a separate named interface for every nested object it finds, rather than inlining object shapes. Array properties get their key name singularized (dropping a trailing "s", turning "-ies" into "-y", or appending "Item" when the key doesn't look plural) to name their element type sensibly, and any interface name that would collide with one already generated gets a numeric suffix appended.

FAQ

Why does a "tags" array produce an interface called "Tag" instead of "Tags"?
When converting an array, the tool singularizes its key to name the element type โ€” so a "tags" array of objects generates a "Tag" interface and types the field as tag: Tag[], which reads more naturally than a plural type name applied to a single item.
What happens if two different nested objects would generate the same interface name?
The converter keeps track of every interface name it has already used and appends a numeric suffix (2, 3, and so on) to any later name that collides, so two differently-shaped objects sharing a property name like "address" don't overwrite each other's generated interface.

Free, unlimited, no account. If this saved you a paid tool, a small thanks is appreciated.

Say thanks โ€” $3