What JSON to Types does
Generate type declarations from JSON in twenty languages, from locally inferred nested types.
Also searched as code generation, generate types, struct, class, model, java, go, golang.
Infer nested value types
Create stable type names
Emit source for the selected language without a network call
Java and Go are the tested legs
Both are checked against a compiler. The other eighteen targets are generated from the same type model through a per-language profile and are a starting point rather than guaranteed-compiling output — expect to fix reserved words used as keys and to split multi-type files where the language requires it.
One example cannot show optionality
Every field is emitted as present and non-null, because a single payload cannot reveal which fields are optional.
JSON to Types FAQ
Does jsontools.me upload my JSON?
No. The document is parsed and processed by json-buf inside a dedicated WebAssembly worker on your device.
Does it work offline?
Yes. After the application shell and engine have loaded once, the installable PWA keeps the tools available without a network connection.