JSON to TypeScript

Paste JSON and get TypeScript interfaces instantly.

No data leaves your device

How to Use

  1. Paste your JSON in the left pane (object or array).
  2. Click Convert · TypeScript interfaces appear on the right.
  3. Adjust the root name and toggle options as needed.
  4. Click Copy Output to copy the generated code.

Frequently Asked Questions

Does it handle nested objects?

Yes. Each nested object gets its own named interface. Array items are also analyzed to determine the element type.

What happens with mixed-type arrays?

If an array contains items of different types, the converter uses a union type (e.g., string | number).

Does it support JSON arrays at the root?

Yes. If the root value is an array, the converter analyzes its items and produces the appropriate interface plus a type alias for the array.

Related Tools

JSON Formatter JSON to CSV JavaScript Minifier