Paste any JSON and get ready-to-use Go structs, with json tags, nested types, slices, and exported field names. Runs entirely in your browser.
Paste a JSON object and this tool walks it to produce matching Go struct definitions, complete
with json:"..." tags so unmarshalling round-trips your original keys. Nested objects become their
own named structs, arrays become slices, and field names are converted to exported PascalCase
with Go’s common initialisms handled, id → ID, url → URL,
api → API.
int when every sample is whole, otherwise float64.interface rather than guessing.*pointer fields (optional), so a zero value is distinguishable from absent.When a key appears in only some objects of an array, it’s emitted as a pointer with omitempty, so an absent value is nil rather than a misleading zero.
Yes, each distinct object shape becomes its own named struct, referenced from the parent. Nesting is unlimited.
No. It’s parsed in your browser, so it’s safe to paste private payloads and it works offline.
Prefer TypeScript? Use JSON → TypeScript. Coming from a spreadsheet? See CSV ⇄ JSON.