JSON to Go Struct
Paste a JSON object or API response and get Go structs with json tags instantly.
Frequently Asked Questions
Why are struct field names capitalized?
Go only exports (makes public) fields whose names start with a capital letter — so json.Unmarshal can't populate a lowercase field from outside the package. The generator capitalizes every field for that reason.
What are the backtick tags for?
The `json:"originalKey"` tag tells encoding/json which JSON key maps to this Go field, so the original camelCase or snake_case key name from your JSON is preserved for marshaling and unmarshaling even though the Go field itself is capitalized.
What does a nested JSON object become?
A separate named struct, referenced as the field's type in the parent struct — matching how Go models nested data without generics-heavy workarounds.
How are numbers typed?
A whole number becomes int; a decimal becomes float64, matching Go's default floating-point type.
Is my JSON uploaded anywhere?
No. The struct generation runs entirely in your browser.