JSON to TypeScript
Paste API responses and get clean TypeScript interfaces: nested objects become named types, arrays are typed, nulls become optional. Live as you type.
Most processing happens locally in your browser. Your inputs are processed on your device and are not uploaded.
Options
Root interface name
JSON input
TypeScript output
Related tools
How to use
- 1
Paste a JSON document.
- 2
Name the root interface and toggle options.
- 3
Copy the interfaces or download types.ts.
Supported formats
Accepts
Produces
FAQ
Each unique shape becomes its own interface (Address, Item…); identical shapes are deduplicated.
Null fields become optional (field?: type) by default — the pragmatic reading of “sometimes null”.
Typed as unknown[] since element type cannot be inferred — adjust to your domain type.
Never — inference runs locally, so you can paste production payloads safely.