JSON to TypeScript Interface

Generate TypeScript interfaces from JSON.

interface MyInterface {
  name: string;
  age: number;
  active: boolean;
}

What is JSON to TypeScript Interface?

Paste a JSON object to generate a TypeScript interface. Nested objects are inlined; arrays use the type of the first element.

FAQ

Is this tool free to use?

Yes. This tool is available to use for free.

Does the tool run in the browser?

Yes. The logic runs client-side in your browser.

Is my data uploaded to a server?

No. Your input stays in your browser and is not uploaded by this tool.

Can I use this tool for large files?

It depends on your device and browser. Very large inputs may be slow; for huge files, use a local CLI tool.

Example usage

Input

{"name": "x"}

Output

interface T { name: string; }

How to use

  1. Paste a JSON object
  2. Optionally set the interface name
  3. Copy the generated TypeScript

Related Tools

XML to JSON

Convert XML into JSON format.

Open Tool

JSON to YAML

Convert JSON into YAML.

Open Tool

YAML to JSON

Convert YAML into JSON.

Open Tool

CSV to TSV

Convert CSV into TSV.

Open Tool

TSV to CSV

Convert TSV into CSV.

Open Tool

Base64 to Image

Preview Base64 image data as an image.

Open Tool

Popular Tools

JSON Formatter

Format, validate, and beautify JSON with syntax highlighting.

Open Tool

Regex Tester

Test regular expressions and highlight matches.

Open Tool

Base64 Encoder

Encode text to Base64.

Open Tool

UUID Generator

Generate UUID v4 identifiers.

Open Tool

JWT Decoder

Decode and inspect JWT header and payload.

Open Tool