Free browser-based converter
JSON to Go Struct Converter
Generate Go structs from sample JSON when you need typed request models, response payloads, or fixture definitions without hand-writing every field. Typify infers nested structs, slices, and exported Go field names automatically.
That makes it useful for backend prototyping, API client work, and debugging unfamiliar payloads when you want a fast starting point for Go code.
JSON input
175 / 50 KB
Go structs
type Root struct { Service Service `json:"service"` } type Service struct { Id float64 `json:"id"` Name string `json:"name"` Healthy bool `json:"healthy"` Owners []Owner `json:"owners"` } type Owner struct { Name string `json:"name"` Email string `json:"email"` }
Example
Start with the sample below, then replace it with your own data to generate output instantly.
Input JSON
{
"service": {
"id": 17,
"name": "typify",
"healthy": true,
"owners": [
{
"name": "Ada",
"email": "ada@example.com"
}
]
}
}Go output
type Root struct {
Service Service `json:"service"`
}
type Service struct {
Id float64 `json:"id"`
Name string `json:"name"`
Healthy bool `json:"healthy"`
Owners []Owner `json:"owners"`
}
type Owner struct {
Name string `json:"name"`
Email string `json:"email"`
}