Skip to content
Developer tool · Free · No upload

API Response to TypeScript

Paste an API response (or multiple samples from the same endpoint) and generate TypeScript types ready to use in your fetch / axios / SWR code. Multi-sample mode detects optional fields and union types accurately - the more samples, the better the types.

Rate this tool

Types Studio

interface · type · Zod schema from any JSON

Never uploaded Free · No sign-up

Your JSON

Comments, trailing commas and single quotes are fine. .

Output

TypeScript output

Types
-
Lines
-
File
Root.ts

Paste JSON on the left. The types appear here as you type.

No sign-up needed JSON never uploaded Updates as you type Comments allowed
Output styles
3
Max enum values
12
Download
.ts
Bytes uploaded
0
Never uploadedYour JSON is parsed in this tab with JSON5. Nothing leaves your device.
Updates as you typeTypes regenerate on every change to the JSON, the root name or an option.
Arrays mergedObjects in an array merge into one type. Keys missing from some become optional.
Free, no sign-upNo account and no limits. Copy the code or download it as a .ts file.
What's next

Do more with your types

Tools that pick up where this one leaves off.