JSON to TypeScript Interface Generator

Paste JSON, get TypeScript interfaces — nested objects, arrays and optional fields handled.

About this tool

Every distinct object shape becomes its own named interface, named after the property that led to it. Arrays of objects are inspected together — fields missing from some elements become optional instead of guessed wrong.

Options

Root name controls the top-level interface's name. Switch to type aliases if your codebase prefers those. Mark everything optional for loosely-typed APIs.

A note on accuracy

This infers types only from what your sample shows — paste a few array elements, not just one, for the best result. Runs entirely locally.