How to use the JSON to TypeScript
- Paste a JSON sample.
- Set the root type name and options.
- Copy the generated TypeScript into your project.
Features
- Nested interfaces named from their keys
- Typed arrays including arrays of objects
- interface or type alias output; optional export keyword
- Mark all fields optional for partial API responses
Frequently asked questions
How are mixed-type arrays handled?
Arrays containing different primitive types become union arrays, e.g. (string | number)[].
How are null values typed?
A null value can't reveal its real type, so it is emitted as `unknown | null` — replace it with the correct type once you know it.