JSON to TypeScript Interface

Generate TypeScript interfaces or types from JSON objects.

Features

  • Interface Generation: Creates TypeScript interface definitions.
  • Nested Handling: Recursively defines interfaces for nested objects.
  • Array Typing: Detects array types, including arrays of objects.
  • Primitive Mapping: Maps JSON primitives to TS types (string, number, boolean, null).

How to Use

  • Paste JSON into the input area.
  • View the Generated TypeScript interfaces.
  • Copy and paste into your `.ts` or `.d.ts` files.