JSON to TypeScript Interface Generator
Generate TypeScript interfaces from any JSON sample. Paste a response and get typed interfaces ready to drop into your codebase.
Output will appear hereType-safe JSON in seconds
Writing TypeScript interfaces by hand for every API response is tedious and error-prone. JSON Mint infers types directly from a sample: primitives map to their TypeScript equivalents, nested objects become their own interfaces, and arrays produce element types via intersection of all observed fields. Fields that are missing from some array elements are marked optional automatically.
Paste a representative sample — ideally with multiple array items so optional fields are detected — and copy the generated interfaces straight into your project.
Frequently Asked Questions
How are optional fields detected?+
When multiple elements in an array have different key sets, JSON Mint takes the union and marks keys that aren't always present as optional with a ?.
What TypeScript version is required?+
The output uses plain interfaces with no advanced features, so TS 3.0+ is enough.
Can I name the root interface?+
The current version defaults to 'Root'. A custom name option is planned.