JSON to TypeScript Interface Generator

Generate TypeScript interfaces & types from JSON online. Nested objects become named interfaces, arrays become typed arrays. Free, instant, client-side.

Input · json0 chars
Output · ts0 chars

🔒 100% private: this tool runs entirely in your browser. Your data is never uploaded, stored or logged anywhere.

How to json → typescript

  1. Paste a JSON sample that represents your data shape.
  2. Get a TypeScript root type plus one interface per nested object.
  3. Copy into your .ts file and adjust optional fields as needed.

FAQ

How are nested objects named?

Interfaces are named after their key path in PascalCase (user → User). Collisions get numeric suffixes.

How are null values typed?

null becomes unknown in the generated type — adjust to your exact union (e.g. string | null) where needed.

Does it generate zod or class validators?

Not yet — output is plain TypeScript types and interfaces you can feed into any validator.

Related tools