What is a JSON to Go converter?
A JSON to Go converter generates Go struct definitions from a JSON sample, including correct json tags, nested structs, and slice types. It is the fastest way to write typed models for REST APIs and webhooks — and it runs entirely in your browser.
How to generate Go structs from JSON
Paste a JSON object or array, adjust the package name if needed, then copy the generated structs into your project. The default package is main.
Type mapping
int is used for whole numbers and float64 for decimals. Nested objects become their own structs named after their key, arrays become slices, and empty or mixed arrays fall back to []interface{}.
Pointers, omitempty, and naming
Fields that are null or missing from some array elements become pointer types with ,omitempty in the tag. Type names are PascalCase versions of the keys with unique suffixes on collisions, and you can rename the root at any time.