HomeJSON to TypeScript Interfaces

JSON to TypeScript Interfaces

Convert JSON data into TypeScript interface definitions with nested object and array type inference

About JSON to TypeScript

TypeScript adds static typing to JavaScript. Converting JSON to TypeScript interfaces improves code completion, type checking, and refactoring.

Highlights

Automatic type inference (string, number, boolean, null)
Supports nested objects and arrays
Outputs either interface or type
Optional property marks
Union types for mixed arrays

Quick start

  1. Paste JSON and the tool parses automatically.
  2. Set the interface name and output options.
  3. Copy or download the generated TypeScript definitions.

Example

Input JSON
{'{'}
  "name": "John",
  "age": 30,
  "isActive": true,
  "address": {'{'}
    "city": "Beijing",
    "zipCode": "100000"
  {'}'}
{'}'}
TypeScript Output
export interface RootObject {
  name: string;
  age: number;
  isActive: boolean;
  address: Address;
}

export interface Address {
  city: string;
  zipCode: string;
}

Notes

  • Arrays infer element types and generate related interfaces.
  • Invalid property names are quoted to keep the types valid.

Data is processed locally in your browser by default and will not be uploaded to any server. Upload will be clearly indicated if required.

© 2026 See-Tool. All rights reserved. | Contact Us