Tool Hub

JSON → TypeScript

Generate TypeScript interfaces from a JSON sample

Generate TypeScript interfaces from a JSON sample. Paste a JSON object, set a root type name, and instantly get nested interface definitions with inferred types. Conversion runs entirely in your browser — no data leaves the page.

Input JSON

Output TypeScript
export interface Address {
  city: string;
  zip: string;
}

export interface Root {
  id: number;
  name: string;
  email: string;
  tags: string[];
  address: Address;
}

How to use

  1. Paste a JSON object into the left panel.
  2. Set the root interface name and choose interface or type alias.
  3. Toggle readonly or null-to-optional as needed.
  4. Copy the generated TypeScript definitions from the right panel — conversion runs entirely in your browser.

Examples

  • Pasting {"id":1,"tags":["dev"],"address":{"city":"Seoul"}} with root name Root produces a Root interface with nested Address interface inferred automatically.
  • Enabling "null → optional" changes fields whose value is null from `field: null` to `field?: unknown`.

Verify outputs before using in production. No warranty — see Terms.