JSON to TypeScript Interface
Generate TypeScript interfaces or types from JSON objects.
Drag & drop a JSON file here, or click to browse
File is read locally — nothing is uploaded to any server
Features
- JSON File Upload: Upload a .json file directly — read locally in your browser, nothing is sent to any server.
- Drag & Drop: Drag and drop a JSON file onto the drop zone for quick loading.
- Interface Generation: Creates TypeScript
interfacedefinitions. - Nested Handling: Recursively defines interfaces for nested objects.
- Array Typing: Detects array types, including arrays of objects.
- Primitive Mapping: Maps JSON primitives to TS types (string, number, boolean, null).
How to Use
- Upload a JSON file using the file picker, or drag & drop a file onto the drop zone.
- Alternatively, paste JSON into the input area.
- View the Generated TypeScript interfaces.
- Copy and paste into your `.ts` or `.d.ts` files.