JSON → TypeScript
Generera interfaces
Om det här verktyget
Paste any JSON sample and get strongly-typed TypeScript interfaces or types. Detects optional fields by merging arrays of objects with different shapes.
Funktioner
- interface or type output
- Merges array elements into a single shape with optionals
- Names nested types from their key
- Quoted keys for non-identifiers
Så använder du det
- Paste a JSON example.
- Set the root type name.
- Copy the generated TypeScript.
🔒 100 % privat
Allt sker i din webbläsare med JavaScript och WebAssembly. Dina filer laddas aldrig upp, lagras aldrig och ses aldrig av oss.
Vanliga frågor
Can it infer string literal unions?
Currently it produces 'string'; literal-union inference is on the roadmap.