New

JSON to TypeScript Types

Runs in browser

Convert JSON objects to TypeScript interfaces and types instantly. Free online JSON to TypeScript generator — no sign-up required.

JSON to TypeScript Types tool

Files never leave your browser.

Drag and drop a file here, or tap to select

export interface Root {
  "id": number;
  "meta": {
    "active": boolean;
  };
  "name": string;
  "tags": string[];
}

How to use

  1. Paste JSON

    Paste a JSON object or array into the input.

  2. Review generated types

    The TypeScript interface updates automatically as you type.

  3. Copy the output

    Use Copy types to copy the generated interface into your project.

Examples

  • Nested object

    Infer nested types and arrays.

    Input
    {"id":1,"user":{"name":"A"},"tags":["x"]}
    Output
    export interface Root { ... }

Frequently asked questions

Is this conversion done on a server?
No. Type generation runs entirely in your browser.
Does it handle arrays of objects?
Yes. It infers array element types and merges object keys across items when possible.

You might find these useful too.