JSON to TypeScript
Paste a JSON sample and get clean TypeScript interfaces back. Nested objects become their own interfaces, arrays of objects are merged, and optional keys and nulls are inferred — all in your browser.
TypeScript interfaces appear here.
Runs in your browser. Your input is not uploaded to PayloadIQ.
JSON to TypeScript turns a JSON sample into typed interfaces you can paste straight into your codebase. The shape is inferred from your example: nested objects become their own named interfaces, arrays of objects are merged into one representative interface, keys missing from some elements become optional (?), and a value that is null in your sample becomes a | null union. Everything runs locally in your browser, so a real API response never leaves your machine.
Readable interfaces, not one giant inline type
Rather than collapsing everything into a single nested literal, each object shape is hoisted into its own export interface with a name inferred from the field. That keeps the output easy to read, easy to import, and easy to extend — the same way you would model the types by hand.
Inference is sample-driven
The generator can only see what you give it, so paste the richest payload you have — for lists of objects it merges the keys across elements and marks any that are missing as optional. Want types in another language (Python, Go, Rust, Prisma, Zod) or a full typed client and schema report from the same payload? Open it in the PayloadIQ playground, or read the in-depth JSON to TypeScript guide.