JSON to TypeScript

Infer TypeScript types from JSON

How to use JSON to TypeScript

Paste JSON to draft interfaces/types. Nested objects become separate interfaces; array roots become type aliases. Complex generics and refined unions are out of scope.

  • Good for quick drafts — review the result manually
  • Invalid JSON shows a parse error
  • Processing stays in your browser

FAQ

What about empty arrays?

Empty arrays become unknown[].

Is JSON uploaded?

No. Inference stays local.