Tools / JSON to TypeScript

JSON to TypeScript

Paste JSON, get clean interfaces — instantly, locally, no data sent anywhere.

Why another JSON to TS tool?

Because it's instant and private. Paste a response from your internal API — the payload never leaves your machine, which matters when the JSON contains customer data, tokens or unreleased product fields. Nested objects become their own interfaces, arrays of objects are unified into one type, and mixed arrays become unions.

Frequently asked questions

Is it safe to paste API responses here?

Yes. Conversion runs entirely in your browser — nothing is transmitted. You can unplug your network and it keeps working.

How are arrays handled?

Element types are unified: an array of same-shaped objects becomes a single interface followed by []; arrays with mixed element types become unions like (string | number)[].

What about null values?

null appears as null in a union, e.g. string | null — exactly what the sample JSON contained.