JSON to Go Struct
Convert JSON to Go structs online for free — generate struct types with json tags from example JSON. Private, in-browser.
Go output
// Generated by blackdroid.dev
type Root struct {
Id int64 `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
Active bool `json:"active"`
Balance float64 `json:"balance"`
Address Address `json:"address"`
Roles []string `json:"roles"`
}
type Address struct {
Street string `json:"street"`
City string `json:"city"`
Zip string `json:"zip"`
}About JSON to Go Struct
Paste JSON and get Go struct definitions with proper `json:` tags — nested objects become named structs, arrays become slices and nullable fields become pointers.
The quickest way to model an API response for encoding/json. Generation runs entirely in your browser — your payload is never uploaded.