🧑‍💻

JSON to TypeScript

Generate TypeScript interfaces from JSON.

TypeScript
export interface Root {
  id: number;
  name: string;
  tags: string[];
  active: boolean;
  address: Address;
}

export interface Address {
  city: string;
}

Arrays of objects are merged into a single interface. Adjust optionality (?) by hand if fields can be missing.

Related Developer tools