Generate TypeScript interfaces from a JSON payload, including nested objects and arrays.
This tool runs entirely in your browser. The file you choose is never uploaded to a server. Free, with no account required.
An array of objects becomes one item interface used as an array; mixed element types become an explicit union, and an empty array becomes unknown[].
A key present in the sample is emitted as required. Marking fields optional without seeing the data say so would produce types that lie.
It becomes an explicit null union member, so the generated type refuses to pretend the value is always a string or number.
Yes - keys that are not valid identifiers (order-id, class, 2026-plan) are quoted or prefixed so the output always compiles.