PrivTab

JSON in TypeScript

JSON in TypeScript

Funziona nel browser · Nessun caricamento

Lo strumento e le istruzioni di questa pagina sono per ora in inglese. Funziona allo stesso modo: tutto avviene nel browser.

Generate TypeScript

  • Nulla lascia il tuo dispositivo
  • Nessun limite di dimensione imposto da un server
  • Nessuna registrazione, nessuna filigrana
  • Gratis

How to convert JSON to TypeScript

  1. Paste your JSON, or try the example.
  2. Choose interface or type, export and optional fields.
  3. Copy or download the TypeScript.

What you get

  • An interface for every object, named after its key.
  • Optional fields (name?: string) for fields missing from some array items.
  • Union types (string | null) where values differ.
  • Keys that aren't valid names (like "created-at") are quoted.

Domande frequenti

Is my JSON uploaded?

No. Everything happens in your browser, and the page is blocked from uploading anything.