JSON to TypeScript Interfaces Online
Convert JSON into TypeScript interfaces, type aliases or a Zod schema live, with real optional-field detection across arrays.
Result
This page opens the converter with interface preselected as the output format — paste a JSON object or array and it prints one or more interface blocks, ready to drop into a .ts file.
Every nested object gets its own named interface instead of an inline blob, and when you paste an array of objects the tool compares every item: a field such as extra present on only some of them is written as extra?: boolean, while fields shared by all items stay required — the same detail most quick converters skip.
The full tool also generates a type-alias version of the same structure and a Zod schema for runtime validation, all from one JSON input — switch formats any time without retyping anything.