OpenAPI to TypeScript Converter

Convert OpenAPI 3.x documents into TypeScript types entirely in your browser with common openapi-typescript generation options.

OpenAPI document
Paste an OpenAPI 3.0 or 3.1 document in JSON or YAML, import it from a file, or fetch it from a CORS-enabled URL.
TypeScript output
Generated TypeScript types are produced with a browser-safe openapi-typescript pipeline and the options below.
/**
 * This file was auto-generated by openapi-typescript.
 * Do not make direct changes to the file.
 */

export interface paths {
    "/users": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get: {
            parameters: {
                query?: never;
                header?: never;
                path?: never;
                cookie?: never;
            };
            requestBody?: never;
            responses: {
                /** @description OK */
                200: {
                    headers: {
                        [name: string]: unknown;
                    };
                    content: {
                        "application/json": components["schemas"]["User"][];
                    };
                };
            };
        };
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
}
export type webhooks = Record<string, never>;
export interface components {
    schemas: {
        User: {
            id: string;
            name: string;
            /** @enum {string} */
            role?: "admin" | "editor" | "viewer";
        };
    };
    responses: never;
    parameters: never;
    requestBodies: never;
    headers: never;
    pathItems: never;
}
export type $defs = Record<string, never>;
export type operations = Record<string, never>;
Generation options
Tune the generated types without changing the source document.

What Is OpenAPI To TypeScript Converter?

OpenAPI to TypeScript Converter turns an OpenAPI 3.x document into generated TypeScript types directly in your browser. It is useful when you want a fast type preview, a downloadable declaration file, or a safe way to test openapi-typescript options without sending your schema to a server.

When To Use It

Use this tool when you already have an OpenAPI schema in JSON or YAML and want typed request and response models for frontend apps, SDK prototypes, or API reviews. It is especially helpful for comparing generation options before you commit the output to your repository.

Before You Generate

This browser rewrite supports bundled OpenAPI 3.0 and 3.1 documents. If your schema still contains external $ref targets, bundle or inline them first, then generate the final TypeScript output here.