⭐ 0

JSON to TypeScript Interfaces Online

Convert JSON into TypeScript interfaces, type aliases or a Zod schema live, with real optional-field detection across arrays.

Processed entirely in your browser — nothing you enter here is ever uploaded.

Processing... 0%

Result

About this tool

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.

Example. The object {"id":1} in interface mode emits an interface named Root whose field id has type number.

Limit. A field is optional only when it is missing from some objects inside the same array; a single object marks every present key as required.