JSON to TypeScript

Generate TypeScript interfaces from JSON data

Processed on your device β€” never uploaded
JSON Input
TypeScript Output

Frequently Asked Questions

How do I generate TypeScript interfaces from JSON?
Paste your JSON data into the input, set a root interface name, and click Generate to get exported TypeScript interfaces with inferred types.
Does this tool handle arrays and nested objects?
Yes, arrays are typed as element type arrays (e.g., string[]) and nested objects become separate named interfaces with proper references.
Can I customize the root interface name?
Yes, use the Root name field to specify a custom name for the top-level interface instead of the default "Root".
What TypeScript types are inferred from JSON?
The tool infers string, number, boolean, null, and unknown types, and generates union types for arrays with mixed element types.