Text & code · runs locally

JSON to TypeScript interfaces

Paste a JSON payload, get named interfaces back — optional fields included when array elements disagree.

Runs on your device No uploads, ever Free, no account

How to use this tool

  1. 1
    Paste a real payload

    An API response, a config file, a database row — the bigger and messier the sample, the better the inference.

  2. 2
    Name the root type

    Root and nested interfaces are PascalCased from the name you give (or the key they came from). Pick interface or type-alias style, with or without export.

  3. 3
    Copy types.ts

    The output is ready to paste into a .ts file — every nested object gets its own declaration.

The fine print

This page has no server behind it. Files are read, changed and re-built by your own browser — then they disappear when you close the tab. That's the whole privacy policy, applied.


Questions people actually ask

What about optional fields?

When an array’s objects disagree about which keys they carry, keys missing from some elements are marked with ?. If every object has the key, it stays required.

Will it handle arrays of mixed shapes?

Yes. Elements whose types differ produce a union (string | number)[], and arrays of objects are merged into one interface with optional keys.


Feedback

Send a message

Messages, reviews and bug reports go to a private feedback log on this site. Nothing is published, and your files are never uploaded.

For a broken tool: the tool name, browser, and the steps that led to it are the most useful things. Do not paste passwords, keys or a sensitive file.

Files are never uploaded. Only this message is stored.

PDF

Tool preview

A short description of the tool.

Runs entirely in your browser. The file never leaves this device.

Open tool