What is a JSON to TypeScript converter?
A JSON to TypeScript converter turns a raw JSON sample into ready-to-use TypeScript interfaces. Paste a realistic API payload and get typed models instantly — handy for API clients, mocks, and config files. Everything runs in your browser.
How to generate TypeScript from JSON
Paste your JSON, optionally set the root interface name, and the code appears live on the right. Press Copy and drop the interfaces into your project.
How types are inferred
Strings map to string, numbers to number, booleans to boolean. Nested objects become named interfaces, arrays of objects are merged into one element interface, and arrays mixing primitive types become unions such as string | number.
Optional, nullable, and naming
Properties missing from some array elements are emitted as optional (prop?), explicit nulls add | null, and the root name you type is reused for every nested name, e.g. ApiResponseItem.