What is JSON to TypeScript Interface?
A JSON to TypeScript interface generator converts sample JSON data into TypeScript interface declarations that describe object properties, nested objects, arrays, primitive values, and nullable fields.
Paste sample JSON to generate TypeScript interfaces for it — or reverse the process and create sample JSON from simple interfaces. Need to clean up the JSON first? Run it through the JSON formatter.
A JSON to TypeScript interface generator converts sample JSON data into TypeScript interface declarations that describe object properties, nested objects, arrays, primitive values, and nullable fields.
The generator parses JSON in the browser, walks through every object and array, infers TypeScript property types, and creates named interfaces for nested object shapes. In reverse mode, it reads simple TypeScript interface declarations and creates sample JSON values for testing or documentation.
{"id":1,"name":"AdminForge"} -> interface RootObject { id: number; name: string; } {"tags":["json","typescript"]} -> tags: string[] {"user":{"email":"hello@example.com"}} -> interface User { email: string; } interface User { id: number; name: string; } -> { "id": 0, "name": "string" }