JSON Schema to TypeScript interface
Paste a JSON Schema (or an OpenAPI document; every entry in components.schemas becomes its own type) and get TypeScript interfaces. Nothing is guessed: required drives optionality, format drives the type mapping, and string enums keep their length.
Read from the schema you paste, on the server, discarded after the response.
Example
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Product",
"type": "object",
"required": ["id", "sku", "name", "price"],
"properties": {
"id": {"type": "integer", "format": "int64"},
"sku": {"type": "string", "maxLength": 40},
"name": {"type": "string", "maxLength": 200},
"price": {"type": "number", "format": "double"},
"status": {"type": "string", "enum": ["draft", "published", "archived"]},
"created_at": {"type": "string", "format": "date-time"}
}
}
export interface Product {
id: number;
sku: string;
name: string;
price: number;
status?: string | null;
createdAt?: string | null;
}