All tools / Converters

JSON to Go Struct

Generate Go structs with json tags from JSON.

Runs in your browser · your data never leaves your device
Ad space

How it works

Each JSON object becomes a struct with exported field names and json tags. Whole numbers become int, decimals float64, and arrays use the type of their first item.

Frequently asked questions

Why is a field interface{}?

Null values and empty arrays give no type information, so they become interface{}.

Related tools