Back to tools
JSON to TypeScript
Generate TypeScript interfaces from a JSON object
About JSON to TypeScript
JSON to TypeScript lets you generate typescript interfaces from a json object.
Category: Converters.
Frequently asked questions
Should I use interface or type?
▾
Both describe object shapes. Interfaces can be extended and declaration-merged; types support unions and intersections. For plain JSON shapes either works — interfaces are the traditional choice.
How are arrays typed?
▾
An array of objects generates a named interface and types the field as InterfaceName[]. A mixed-type array becomes any[].
What happens with null values?
▾
Fields with null become typed as null. Combine with undefined using | undefined, or wrap with NonNullable<> as needed in your project.
Does it handle deeply nested objects?
▾
Yes. Each nested object generates its own interface, and the parent references it by name — matching standard TypeScript conventions.