Paste any JSON and instantly get strongly-typed TypeScript interfaces. Supports optional fields, readonly, nested types, arrays, export modifiers, and type alias output.
TypeScript interfaces provide compile-time type safety for JSON data structures — API responses, configuration files, database documents. Writing them manually is repetitive and error-prone. This generator reads your JSON and outputs the complete type tree in seconds, including nested objects, arrays, and union types.
Both describe object shapes. interface is extendable with extends and preferred for public API shapes. type supports unions, intersections, and mapped types. Toggle between them with the Type Alias option.
When enabled, all properties are marked optional (field?: Type), reflecting that real API responses may omit fields. Disable for strict required-field models.
Adding readonly prevents property reassignment after construction. Useful for immutable data transfer objects (DTOs) and configuration shapes.
Nested JSON objects generate child interfaces. Arrays of objects generate typed arrays like items: Item[]. Arrays of mixed types become unknown[].