JSON to TypeScript

Infer TypeScript types from JSON

01

JSON input

Paste a JSON object or array to infer field types.

Used as the generated interface or type name.

JSON is processed locally in your browser.

02

TypeScript output

Generate an interface or array type draft, ready to copy.

Review the generated result against your actual API data.

Tool guide

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.