Monu Tools

JSON to TypeScript

Generate TypeScript interfaces from a JSON sample, with nested types, arrays and optional fields. Runs in your browser.

How to use the JSON to TS

  1. 01

    Paste a JSON object or array.

  2. 02

    Optionally set the root interface name.

  3. 03

    Copy the generated TypeScript interfaces.

Frequently asked questions

How are nested objects handled?

Each nested object becomes its own named interface, referenced from its parent, so the result is clean and reusable.

What about arrays with different shapes?

Arrays of objects are merged into one interface, and keys missing from some elements are marked optional. Arrays of mixed primitives become a union element type.

Is my JSON uploaded anywhere?

No. The types are generated entirely in your browser, so your data never leaves your device.

About this tool

A JSON to TypeScript generator that infers interfaces from an example, handling nested objects, arrays of objects with optional keys, and union types.

It runs locally in your browser, so it is fast and your data stays private. It infers a shape from the sample rather than enforcing a schema.

Related tools

We use essential cookies to run the site. With your consent we also load Google AdSense, which sets advertising cookies. See our privacy policy.