Skip to the tool
GigaJSON

JSON to TypeScript

All tools
Guides Open GigaJSON

Paste an example, like an API response or a config file, and get TypeScript interfaces for it. Nested objects get their own interfaces. A field missing from some items becomes optional, and a field with mixed values becomes a union.

How to use it

  1. Paste JSON or open a file.
  2. The interfaces appear as you type.
  3. Copy them into your code or download a .ts file.

Private, and made for big files

This tool runs in your browser, in a background worker: nothing you paste or open is uploaded, and nothing is kept after you leave. Input can be up to 1 GB, but this operation needs its output to fit in the browser’s text limit. A smaller input may be required. If your connection drops while you're here, the tool keeps working. When one tool isn't enough, GigaJSON opens your data with a tree, a table, JSONPath/JMESPath/jq queries, transforms, diff and history.

Questions

How are optional fields detected?

If a key is missing from some objects in a list, it's marked optional (key?:).

Is my data uploaded?

No. The tool runs in your browser, in a background worker. Nothing you paste or open goes to a server, and nothing is kept after you leave the page.

All tools