Data Processingpublic tool
JSON to TypeScript
Turn a JSON sample into TypeScript interfaces — nested shapes become named types, mixed values become unions, and missing keys become optional properties.
- Root type
- Root
- Declaration
- interfaces
- Status
- 3 types
- Local
- 100% browser
JSON sample
The shape the types are inferred from
TypeScript
Generated declarations
export interface Root {
id: number
name: string
active: boolean
score: null
tags: string[]
profile: Profile
projects: Project[]
}
export interface Profile {
createdAt: string
count: number
}
export interface Project {
title: string
stars: number
archived: boolean
notes?: null
}