Open huge JSON files instantly. Free & private.🔒 Your data never leaves your browser

JSON to Go

Paste JSON and get Go structs with json tags, int64 numbers, pointers for optional fields and Go-style names (ID, URL). Free and private.

JSON
Go

How the Go structs are built

  • Every field gets a json:"…" tag with the original key, so renamed fields like created-at → CreatedAt still decode.
  • Keys missing in some array items become pointers with omitempty, so you can tell "missing" from "zero".
  • Whole numbers become int64, so big IDs fit. Common initialisms follow Go style: id → ID, url → URL.
  • Values that are only ever null, or mix types, become any.

Decode JSON into the struct

var data Root
if err := json.Unmarshal(body, &data); err != nil {
    log.Fatal(err)
}
fmt.Println(data.Title)

Smart type detection

Objects inside arrays are merged into one type, so a key that appears in only some items is still included (as optional). Names come from the keys, and plural keys become singular: comments → Comment. Whole numbers and decimals in the same field become a decimal type. Everything runs in your browser; your JSON is never uploaded.

More free tools