←

JSON to TypeScript Interface Generator

JSON Input
Generated TypeScript Definitions
Instructions for use

Paste valid JSON data into the left input area or click sample presets, configure root interface name, declaration type (interface or type), indent spacing, and export keyword. Formatted TypeScript definitions generate instantly on the right. Click 'Copy Code' to save to clipboard or 'Export .ts' to download the TypeScript file. All processing is computed entirely client-side.

Powered by a pure client-side recursive AST inference engine, this tool automatically resolves nested objects, extracts union types from heterogeneous arrays, compares object collections to flag optional properties (?:), and sanitizes invalid property identifiers with quotes. All processing is 100% offline in your browser.

JSON to TypeScript Interface Help

Powered by a pure client-side recursive AST inference engine, this tool automatically resolves nested objects, extracts union types from heterogeneous arrays, compares object collections to flag optional properties (?:), and sanitizes invalid property identifiers with quotes. All processing is 100% offline in your browser.

settings