🔷

JSON to TypeScript Interfaces

Paste JSON and get clean TypeScript interfaces, with nested types named automatically.

Frequently Asked Questions

How are interface names chosen?

The root is named Root (rename it in the options). Nested objects are named after their key, singularised and PascalCased — for example "address" becomes Address, "items" becomes Item.

How are arrays typed?

The element type is inferred from the first array item. Arrays of objects generate their own interface; mixed arrays become a union of the observed types.

What about optional fields?

When the JSON is an array of objects, keys missing from some items are marked optional with ?. Single objects produce all-required fields.

Does it handle dates?

Values stay typed as string. JSON has no date type, so date strings are correctly typed as string — refine them manually if needed.

Related Tools