JSON to TypeScript

Generate TypeScript interfaces from any JSON object. Nested objects become nested interfaces — paste and copy.

Generate TypeScript interfaces from JSON in one click. Paste any API response and get typed interfaces with nested objects converted to named sub-interfaces, optional export and readonly modifiers — no more hand-typing API types.

How to use the JSON to TypeScript Generator

  1. Paste a JSON object or API response.
  2. Set the root interface name and options, then hit Generate.
  3. Copy the interfaces into your .ts file.

Frequently asked questions

How do I generate TypeScript types from JSON?

Paste the JSON above and click Generate — each object becomes an interface, arrays of objects become typed arrays.

Does it handle nested objects?

Yes — nested objects get their own named interfaces (e.g. Profile), referenced from the parent interface.

What types does it infer?

string, number, boolean, arrays, nested interfaces, and any for null, empty arrays or mixed values.

Can I make the fields readonly?

Yes — tick the readonly option and every field is emitted with the readonly modifier.