Monu Tools

JSON to TypeScript

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

Cómo usar 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.

Preguntas frecuentes

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.

Acerca de esta herramienta

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.

Herramientas relacionadas

Usamos cookies esenciales para que el sitio funcione. Con tu consentimiento también cargamos Google AdSense, que establece cookies publicitarias. Consulta nuestra política de privacidad.