JSON to TypeScript

Paste any JSON and instantly get a TypeScript interface or type definition. Infers optional fields from arrays, handles nested objects and arrays, and generates clean idiomatic TypeScript.

Runs in your browser Nothing uploaded Free, no signup

Everything stays in this browser

JSON to TypeScript: questions

Does it handle arrays of mixed types?
It generates a union type for the array element type. If all objects share the same shape, you get a clean single interface.
How are keys with special characters handled?
Keys that aren't valid TypeScript identifiers are wrapped in quotes in the interface definition.

Made something with AI? Share it as a private link.

Drop in the HTML from Claude, ChatGPT or any editor and get a link your client can open anywhere — with a password, view tracking, comments and approval.