JSON to TypeScript

Paste JSON to generate TypeScript interfaces. Handles nested objects, arrays, and optional fields.

NameStyleOptionalSemicolonsExport
Input JSON✓ Valid JSON
objects: 4arrays: 2keys: 19depth: 3
TypeScript Output
export interface Root {
  id: number;
  name: string;
  email: string;
  age: number;
  isActive: boolean;
  score: number;
  tags: string[];
  address: Address;
  projects: Project[];
  lastLogin?: null;
}

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

export interface Project {
  id: number;
  name: string;
  done: boolean;
}