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
Go
Elixir
Paste JSON to generate types
Inference Rules
- Arrays unify the types of all their elements
-
Empty arrays become
any[],[]interface{}, andlist() -
Fields missing from some sibling objects become optional
(
?in TS,omitemptyin Go) -
nullbecomes nullable: TS| null, Go pointers, Elixir| nil
- Mixed scalar arrays widen to unions; other mixes fall back to any
-
Go emits
float64for all numbers with lowercase json tags -
Elixir splits numbers into
integer()/float() - Nested objects are hoisted into named types in every language
We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect