JSON to TypeScript

Free. No sign-up. Your input is processed in your browser.

Paste JSON and get TypeScript interfaces.

How to use it

  1. Paste sample JSON.
  2. Keep TypeScript selected.
  3. Copy the interfaces into your project.

What you get

Each object shape becomes an exported interface. A key missing from some items gets ?, and a null value adds | null when another sample shows the real type. Keys that are not valid identifiers are quoted.

Limits

Mixed or unknown values become unknown. Interfaces do not check data at run time.

Questions

Are dates typed as Date?

No. JSON carries dates as text, so they are typed as string.

Is any used?

No. The generator uses unknown.

Related tools

See all tools