How to generate TypeScript types from JSON
1. Paste JSON
Drop in an API response or any JSON document. It is parsed and validated instantly.
2. Types are inferred
Nested objects become their own interfaces; arrays are scanned so properties missing from some items become optional.
3. Copy or download
Grab the generated interfaces (or type aliases) and paste them straight into your project.
Hand-writing types for a big API response is tedious and error-prone — this generator scans every object in every array, merges the shapes, marks missing keys optional, and unions mixed primitive types (string | number). Sub-objects get their own named interfaces so the output reads like hand-written code. Tidy the input first with the JSON Formatter, or compare two payloads with JSON Diff.