JSON to TypeScript Generator
Paste example JSON or an API response and generate readable TypeScript without uploading data.
0 bytes
TypeScript appears here. Everything runs in your browser.
Ready
Nested API responses
Objects and arrays are inferred recursively, including arrays of nested objects and repeated response items.
Conservative ambiguous types
Mixed primitive arrays become unions, empty arrays become unknown[], and null-only values stay null.
Safe property names
Invalid TypeScript identifiers are emitted as quoted keys, so API fields with spaces or hyphens still compile.