JSON & data

JSON to TypeScript

Turn any JSON sample into clean TypeScript interfaces.

Runs locally Free No signup

A working example is preloaded — edit it or clear it.

JSON → TypeScriptTypeScript


      

What this tool does

Typing API responses by hand is slow and easy to get wrong. Paste a representative JSON sample and this converter infers nested interfaces, merges array item shapes and marks fields missing from some items as optional. Review the result: one sample cannot reveal every possible response shape.

How to use it

  1. Paste a representative JSON sample.
  2. Set the root interface name and options.
  3. Copy the generated TypeScript.

Questions

Does it call my API?

No. You paste a JSON sample; no request is made and no URL is needed.

How are arrays handled?

Object items are merged into a single interface. Primitive arrays become string[], number[] and so on; mixed values become unions.

Why are some fields optional?

A key missing from at least one object in an array is optional in the merged type, because it is not guaranteed in every item.

← Back to all tools
Type to filter, ↑↓ to move, ↵ to open, esc to close.esc