JSON to TypeScript Converter

Convert JSON into clean TypeScript interfaces and types instantly.

Converter options

JSON Input

Paste your JSON object or array

JSON
496 charactersValid JSON

TypeScript Output

Generated definitions update automatically

TypeScript
export interface Root {
  id: number;
  name: string;
  email: string;
  isActive: boolean;
  profile: RootProfile;
  roles: string[];
  appointments: RootAppointmentsItem[];
  lastLogin: null;
}

export interface RootAppointmentsItem {
  id: number;
  service: string;
  durationMinutes: number;
  completed?: unknown;
}

export interface RootProfile {
  company: string;
  address: RootProfileAddress;
}

export interface RootProfileAddress {
  city: string;
  country: string;
}
27 lines generated

Runs locally in your browser. Your JSON is not uploaded.

Nested types

Create separate definitions for nested objects and arrays of objects.

Flexible output

Choose interfaces or type aliases and customize the root type name.

Browser-based

Validate JSON and generate TypeScript without sending your data to a server.