Developer
JSON to TypeScript
Paste a JSON sample and get TypeScript interfaces. Nested objects become named types, and keys that differ across array items are optional.
Free forever.
How to make TypeScript from JSON
- Paste one JSON value. An object or an array of objects both work.
- Name the root interface. Nested objects are named from their keys.
- Copy or download the result. Keys missing from some rows in an array are marked optional.
Questions
Does this cover every JSON value I might receive?
It describes the sample you paste. If a later response adds a field, that field is not in the interface until you include it in the sample.
What happens to null?
A null value becomes null in the type. If the same key is missing on another object in an array, the property is also optional.
This runs entirely in your browser. Nothing you type is sent to a server.

