JSON to TypeScript
Generate types from a real API response.
Runs entirely in your browser — your data is never uploaded to any server.
How it works
- Paste a JSON sampleThe more representative the sample, the better the types.
- Name the root typeNested types are named from their keys.
- Copy into your projectReady-to-use TypeScript declarations.
What this tool does
- Nested objects become their own named interfaces
- Array element types inferred, including arrays of mixed shapes
- Fields missing from some records in an array are marked optional
- Keys that are not valid identifiers are quoted correctly
Frequently Asked Questions
Privacy and security
Your input is processed by JavaScript running inside your browser. Nothing you paste is sent over the network, logged, or stored — which is what makes this safe to use with production data. If you want to check this yourself: open your browser’s developer tools, switch to the Network tab, and use the tool — you will see no request carrying your file or input leave the page.