JSON to TypeScript
Generate interfaces from a JSON sample.
🔒 Processed on your device — nothing is uploaded.
About the JSON to TypeScript
Writing type definitions by hand for API responses is tedious and error-prone. Paste a JSON sample to generate TypeScript interfaces, Go structs or Python dataclasses, including nested objects and arrays.
When to use it
- Typing API responses in TypeScript front-ends
- Creating Go structs with JSON tags for a backend
- Modelling data with Python dataclasses
- Documenting the shape of a payload
Tips for the best results
- Use a sample that includes every field you expect, as optional fields can’t be guessed
- Rename the root type to match your domain
- Review number types — integers and decimals are detected from the sample
How to use the JSON to TypeScript
- Paste your input into the JSON to TypeScript.
- The output is generated instantly in your browser.
- Copy or download the result.
JSON to TypeScript FAQ
Is the JSON to TypeScript free?
Yes. The JSON to TypeScript is completely free with no sign-up, no daily limit and no watermark.
Is it safe to use the JSON to TypeScript with private files?
Yes. The JSON to TypeScript runs entirely inside your web browser, so your files and text are never uploaded to any server.
Does the JSON to TypeScript work on mobile?
Yes. It works in Chrome, Safari, Edge and Firefox on Android, iPhone, Windows and Mac.
More developer tools
QR Code GeneratorLinks, WiFi, WhatsApp, text — PNG download.
JSON FormatterPretty-print, minify and validate JSON.
Password GeneratorStrong random passwords made on your device.
Base64 & URL EncoderEncode or decode Base64 and URL strings.
Hash GeneratorMD5, SHA-1, SHA-256 and SHA-512 for text or files.
JWT DecoderRead a token's header, payload and expiry.
UUID GeneratorBulk UUID v4 and time-ordered v7 IDs.
Epoch ConverterUnix timestamps to dates and back.