JSON to TypeScript

Generate TypeScript interfaces from JSON data. Handles nested objects, arrays, and union types.

JSON Input
TypeScript Output
export interface Root {
  id: number;
  name: string;
  email: string;
  isActive: boolean;
  roles: string[];
  address: Address;
  orders: Orders[];
  metadata: null;
}

export interface Orders {
  orderId: string;
  total: number;
  items: string[];
}

export interface Address {
  street: string;
  city: string;
  zip: string;
  coordinates: Coordinates;
}

export interface Coordinates {
  lat: number;
  lng: number;
}