JSON to TypeScript

Generate TypeScript interfaces and type definitions from JSON sample data directly in your browser.

Your data is processed locally in your browser and is never uploaded.

How JSON becomes TypeScript

Objects become interfaces, arrays become array types, and primitive values map to their TypeScript equivalents. Nested objects receive readable named interfaces.

Sample-aware inference

For arrays of objects, properties missing from some samples become optional and conflicting values become unions. Empty arrays use unknown because their item type cannot be inferred safely.

Private local generation

Generated types reflect the structure of the JSON you provide. Your JSON is processed locally in your browser and is never uploaded.

Related JSON tools