All tools · 📐 Format / Inspect

🔄 JSON → TypeScript Types

Paste any JSON example — we infer TypeScript interfaces with correct types for strings, numbers, booleans, nested objects, and arrays. Handles optional properties (null in input → optional in TS).

Loading tool…

Examples

Simple flat object
Input{ "id": 1, "name": "Alice", "active": true }
Outputinterface Root { id: number; name: string; active: boolean; }
Nested + array
Input{ "user": {"id":1,"tags":["a","b"]} }
Outputinterface User { id: number; tags: string[]; } interface Root { user: User; }

Frequently asked questions

Are the inferred types correct?

For one example yes. But if your real data sometimes has null or missing fields, the inferred types may be too narrow. Always inspect and adjust.

Why are some types unknown[]?

When an array is empty in the sample, we can't infer the element type. Fill in by hand or provide a non-empty example.

Comparable to quicktype?

quicktype handles more languages and more sophisticated inference (unions, dates). This tool is simpler and faster for quick TS scaffolding.

About this tool

JSON → TypeScript Types runs entirely in your browser using standard Web APIs. No data is sent to any server. The source for this tool is in our public GitHub repository.

Related tools

← All 96 tools

Why this tool

vs typical free web-tool sites

1vwTypical free site
PriceFreeFree
Signup requiredNoOften (for premium features)
Ads inside the toolNoYes (banner + video)
Data sent to serverNo (browser-only)Yes (inputs analyzed for ads)
Total tools96Often <20 or scattered across sites
Bookmarkable URL per toolYesMixed
Loads in under 1sYes (static)Often slow (ad tracking)
MultilingualEN / ES / PT / FR / DEUsually EN only
Open sourceYesNo