JSON Tools
Popular
Recently added

JSON to TypeScript Interface

Paste JSON and get an exported TypeScript interface or type. Nested objects and arrays are inferred automatically. Free TS generator - instant, no signup.

Features

  • Custom interface name
  • Nested object inference
  • Array type detection
  • One-click copy

How to use JSON to TS

  • 1
    Paste sample JSON.
  • 2
    Set an interface name if you want.
  • 3
    Copy the generated TypeScript.

Examples

Simple object

Input
{"id":1,"name":"Ada"}
Output
export interface Root {
 id: number;
 name: string;
}

About JSON to TS

JSON to TypeScript Interface helps you scaffold types from API responses. Infer string, number, boolean, arrays, and nested object shapes without leaving the browser.

Frequently asked questions

No. Fields present in the sample are required in the generated interface.

Empty arrays become unknown[].

No. Generation is client-side.