Type definitions
JSON structure is converted to TypeScript interfaces or types.
Convert your sample JSON into precise TypeScript interfaces and type aliases. This free tool handles optional properties, arrays, unions, and nested objects, perfect for adding type safety to your frontend or Node.js apps. No sign-up, works entirely in your browser.
Converted output will appear hereJSON structure is converted to TypeScript interfaces or types.
Your sample data stays in your browser.
The generated code is ready to copy into your project.
export interface ServerConfig {\n host: string;\n port: number;\n}\n\nexport interface AppConfig {\n server: ServerConfig;\n}