JSON to Go Struct

Generate Go structs with json tags from a JSON sample.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Generate Go structs from JSON

Paste a representative JSON sample and get typed Go structs complete with json:"..." struct tags. Nested objects each become their own exported struct, arrays become slices, and common initialisms like ID and URL are capitalised the way Go’s style guide expects.

Numbers become int64 when integral and float64 otherwise. Because the types are inferred from one sample, treat the output as a strong starting point. All inference happens in your browser — your JSON is never uploaded or stored.

Ad placeholder (rectangle)