JSON → TypeScript
Générer des interfaces
À propos de cet outil
Paste any JSON sample and get strongly-typed TypeScript interfaces or types. Detects optional fields by merging arrays of objects with different shapes.
Fonctionnalités
- interface or type output
- Merges array elements into a single shape with optionals
- Names nested types from their key
- Quoted keys for non-identifiers
Comment l'utiliser
- Paste a JSON example.
- Set the root type name.
- Copy the generated TypeScript.
🔒 100 % privé
Tout se passe dans votre navigateur grâce à JavaScript et WebAssembly. Vos fichiers ne sont jamais téléversés, jamais stockés et jamais vus par nous.
Questions fréquentes
Can it infer string literal unions?
Currently it produces 'string'; literal-union inference is on the roadmap.