AZ Tools

JSON to Go Struct Converter

Developer

Paste any JSON object or array and get a ready-to-use Go struct definition with the correct field types (string, int64, float64, bool), nested structs, slices, and `json:"..."` tags. Everything runs locally in your browser — your JSON is never uploaded.

Go struct

How to use

  1. Paste or type your JSON into the input box.
  2. Optionally rename the root struct (defaults to AutoGenerated).
  3. Copy the generated Go struct from the output box.

Frequently asked questions

How are numbers typed?
Whole numbers become int64 and numbers with a decimal point become float64. Adjust manually if you need a narrower type.
What happens with null or empty arrays?
null values and empty arrays map to interface{} since their type can't be inferred from the sample.
Is my JSON sent anywhere?
No. Conversion happens entirely in your browser; nothing is uploaded.

Related tools