Integrate an API
Create nested structs and JSON tags from a representative response body.
Generate tool
Generate idiomatic Go structs with JSON tags from sample JSON directly in your browser.
Your input and result are not sent to JSON Hearth or stored on a server.
When to use it
Generate Go structs as a starting point for decoding API responses, events and configuration with the standard encoding/json package.
Create nested structs and JSON tags from a representative response body.
Turn sample messages into types for consumers, handlers and tests.
Get a compilable-looking starting structure before refining names, pointers and custom types.
How it works
Paste a value, open a local file or begin with the working sample.
The transformation executes in your browser, not on our servers.
Check the output, then copy or download it for your next task.
Important limitations
One sample cannot determine when fields should be pointers, optional or represented by custom types.
Review numeric precision, time values and nullable fields before production use.
Common questions
No. Your input is processed by code running in your browser and is not sent to an application server.
Yes. The tool is free, requires no account and can be used directly in the browser.
Examples do not reveal every possible value, nullability rule or domain-specific type such as time.Time.
Yes. Generated fields include tags that preserve the original JSON property names.