JSON to Types Converter

Generate TypeScript interfaces, Go structs, and Elixir typespecs from JSON — everything runs client-side in your browser.

JSON Input

0 chars
TypeScript
Paste JSON to generate types

Inference Rules

  • Arrays unify the types of all their elements
  • Empty arrays become any[], []interface{}, and list()
  • Fields missing from some sibling objects become optional (? in TS, omitempty in Go)
  • null becomes nullable: TS | null, Go pointers, Elixir | nil
  • Mixed scalar arrays widen to unions; other mixes fall back to any
  • Go emits float64 for all numbers with lowercase json tags
  • Elixir splits numbers into integer() / float()
  • Nested objects are hoisted into named types in every language