JSON to TypeScript

Paste a JSON object and get TypeScript interface(s) inferred from the structure. Useful for API types.

JSON to TypeScript

How it works

We traverse the JSON and infer types (string, number, boolean, object, array) and generate interface names.

When to use it

Use when you have sample JSON and want quick TypeScript types.

Frequently asked questions

Optional vs required?

We treat all properties as required; you can mark optional manually.

Nested?

Yes. Nested objects become separate interfaces or inline types.