JSON Schema to TypeScript

Runs in browser

Convert JSON Schema to TypeScript types and interfaces instantly.

Convert JSON Schema to TypeScript types instantly. Fast, browser-based, and no uploads.

JSON Schema to TypeScript tool

🔒 Runs in your browser · No uploads · Your data never leaves your device

How to use

  1. Paste JSON Schema

    Paste a valid JSON Schema object into the left panel.

  2. Get TypeScript

    TypeScript types appear instantly in the right panel.

  3. Copy

    Click Copy TypeScript to copy the output.

Common use cases

  • Generating TypeScript types from API schemasConvert OpenAPI or JSON Schema definitions to TypeScript interfaces for type-safe API consumption.
  • Bootstrapping type definitions from documentationConvert JSON Schema from API docs to TypeScript types to start building a typed client immediately.

Examples

  • Object schema

    Simple object schema to interface.

    Input
    {"title":"User","type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id"]}
    Output
    export interface User {
      id: number;
      name?: string;
    }

Frequently asked questions

Does it use a library?
No. The converter is hand-written and runs fully in your browser.
What about $ref references?
Simple $ref names are extracted and used as TypeScript type names. Recursive resolution is not supported.

Key concepts

JSON Schema
A declarative format for describing JSON data structures, including types, required fields, and value constraints.
TypeScript interface
A TypeScript type definition that describes the shape of an object, generated here from JSON Schema properties.

You might find these useful too.

More json tools