JSON Schema to TypeScript
Paste a JSON Schema and instantly generate working TypeScript interfaces and types. No data ever leaves your browser.
JSON Schema
TypeScript
export interface Person {
name: string;
age?: number;
}
export interface User {
id: number;
name: string;
email?: string;
role: "admin" | "editor" | "viewer";
tags?: string[];
address?: UserAddress;
settings?: Record<string, boolean>;
manager?: Person;
}
export interface UserAddress {
street?: string;
city: string;
zip?: string;
}Supported features
- Objects → interfaces with optional fields from required
- Arrays → T[] from the items type
- Enum and const → literal union types
- $ref pointers into #/definitions and #/$defs
- oneOf / anyOf → union types
- additionalProperties → index signatures
About this tool
This generator covers the common draft-07 subset of JSON Schema and emits paste-ready TypeScript: objects become interfaces with optional fields, arrays become T[], enums become literal unions, and $ref pointers resolve to named types. Nested objects are hoisted into their own named interfaces for readability. Everything runs entirely in your browser — your schema is never sent to a server.