JSON → TypeScript
Generate interfaces and types from API response samples
JSON (sample API response)
TypeScript
Types are inferred from a single sample. Keys present in only some array items become optional (?), and values that were only null come out as null — adjust them to match your real types.
How to use JSON → TypeScript
- Paste a sample API response in JSON and get TypeScript interface or type definitions.
- Nested objects become separate types, and fields from objects inside arrays are merged, with optional fields marked (?).
- Copy the generated types and paste them straight into your project.