JSON to TypeScript types

Infer TypeScript types from a JSON example, including nested arrays and objects.

Processed on your device

Input

Open a local UTF-8 text file5 MiB maximum. The file opens in the text box above.Or drop a file here.

Options

Options

How to use this tool

  1. Paste representative JSON.
  2. Choose a valid TypeScript name for the exported root type.
  3. Review inferred unions and empty-array unknowns before adopting the type.

Things to know

  • Types describe the provided sample, not a validated API contract. Unsafe integer values produce bigint types and require a matching parser.
  • Each text input accepts up to 5 MiB. Output is limited to 25 MiB and combined text settings to 1 MiB.
  • Structured documents accept up to 128 nesting levels and 250,000 values; query and schema modes have additional limits.

You might also need

More in data & csv