Paste any JSON object or array and get auto-generated TypeScript interfaces or type aliases.
When consuming an API or processing config files, you need TypeScript types that match the data shape. Hand-writing them is slow and error-prone. This tool infers the most precise types it can — including nested objects, mixed arrays as union types, and nullability detection — saving hours of typing.
If all array elements share a structure, the type is Item[]. If elements have different shapes, the result is a union: (A | B)[].
Fields appear optional when they're missing in some objects of an array, or when at least one occurrence is null or undefined (depending on your selected mode).
Want more detail? Read How to Use JSON to TypeScript Converter: Practical Guide and Best Practices.