JSON to Go (Golang) Struct

Auto-Generate Structs • Complete with JSON Tags

Convert JSON to Go Struct
Output updates live as you type or change settings
About
How Inference Works
Contact

About JSON to Go (Golang) Struct

This tool reads a JSON object and generates matching Go (Golang) struct definitions — with exported (capitalized) field names and json:"..." struct tags on every field, so encoding/json can correctly map each field back to its original JSON key. Nested objects become their own separate struct types, and arrays are typed as Go slices. Paste a sample API response and get ready-to-use struct definitions in seconds. All processing happens locally in your browser; your data is never uploaded to a server.