JSON to TypeScript Interface

Your workspaceProcessed on your device

A few things to know.

Runs on this device with up to 4,194,304 input and output characters, 4 MiB per file, 128 nested levels and 500,000 JSON tokens. JSON numbers infer TypeScript number and JSON strings infer string. Declarations describe the observed structure and provide compile-time types.

  1. Paste representative JSON or open a local UTF-8 file.
  2. Enter a root declaration name and choose interfaces for objects or type aliases. Use the optional-property setting if the input represents a partial response.
  3. Generate TypeScript, review the inferred unions and properties, and copy or download types.ts.