JSON to TypeScript Types
Generate TypeScript types from JSON, including nested objects, arrays and optional properties.
Hover over or focus a field for help. Press Escape to close.
How it works
Paste your content or load the example. Choose the available options, run the tool, then copy or download the result.
A practical example
JSON
[{"name":"Ada","age":30},{"name":"Lin"}]Frequently asked questions
Is my input sent to a server?
No. Your content is processed in this browser. It is never sent to the server or saved.
What should I know about JSON to TypeScript Types?
Types are inferred from supplied examples only. Missing fields in object arrays become optional.