Generate TypeScript interfaces from a JSON sample, with nested types, arrays and optional fields. Runs in your browser.
Cómo usar JSON to TS
Paste a JSON object or array.
Optionally set the root interface name.
Copy the generated TypeScript interfaces.
Preguntas frecuentes
Each nested object becomes its own named interface, referenced from its parent, so the result is clean and reusable.
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.
No. The types are generated entirely in your browser, so your data never leaves your device.
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
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text, right in your browser.
Convert colors between HEX, RGB and HSL with a live preview.
Convert Unix timestamps to human dates and back — UTC, local, ISO 8601 and relative time. Seconds and milliseconds are auto-detected.
Percent-encode and decode URLs and URL components, UTF-8 safe.
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.