JSON to TypeScript

Turn a JSON sample into TypeScript interfaces — nested objects, arrays, and optional keys handled

Notes

  • • Types are inferred from one sample — check nullable and union fields by hand
  • • Arrays of objects are merged into a single interface across all elements
  • • Empty arrays become unknown[]; mixed primitives become a union
  • • Everything runs in your browser — no data is uploaded
Share this tool