JSON to TypeScript Converter
Paste your JSON and get TypeScript interfaces instantly
JSON Input
TypeScript Output
export interface Coordinates {
lat: number;
lng: number;
}
export interface Address {
street: string;
city: string;
state: string;
zip: string;
coordinates: Coordinates;
}
export interface Friends {
id: number;
name: string;
closeFriend: boolean;
}
export interface Friends2 {
id: number;
name: string;
closeFriend: boolean;
}
export interface Root {
id: number;
name: string;
email: string;
isActive: boolean;
age: number;
address: Address;
tags: string[];
scores: number[];
friends: (Friends | Friends2)[];
metadata: null | unknown;
emptyList: unknown[];
}