Tool
JSON to TypeScript
Generate TypeScript interfaces or types from JSON, with optional/nullable accuracy
How to use
- Paste a JSON object or array of objects into the input pane.
- For best optional-field detection, paste an array with several shape variants.
- Toggle interface vs type alias output, and readonly modifiers if you want immutability.
- Copy the generated types into your project.
About this tool
Most JSON-to-TS tools convert one object at a time and mark everything required. This one merges all elements of an array into a single best-effort interface: fields present in every row are required, missing ones optional, null-ed ones nullable unions. Paste your real API samples — edge cases included — and the generated types will match reality.