Developer 🔒 Runs in your browser — no data sent to servers

JSON to Go Struct

Turn a JSON sample into Go structs with json tags.

Generate Go Structs from JSON

Go needs a struct with json tags before it can decode a response cleanly. This page opens JSON to Types with Go chosen, so the structs and tags are written for you.

Types used

Whole numbers become int64, others float64, arrays become slices such as []string, and values of mixed type become interface{}. Nested objects become their own structs, named after their key.

Related tools

For the frontend, see JSON to TypeScript. To check the JSON first, use the JSON formatter.

Guides