Dev Tools

JSON → TypeScript

Generate TypeScript interfaces or type aliases from JSON. Handles nested objects, arrays, unions, and nullable types.

Root type name
JSON input
TypeScript output
interface Address {
  street: string;
  city: string;
  zip: string;
}

interface Order {
  id: number;
  total: number;
  items: string[];
}

interface Root {
  id: number;
  name: string;
  email: string;
  active: boolean;
  address: Address;
  tags: string[];
  orders: Order[];
  metadata: unknown | null;
}
Was this page helpful?

Related tools