base64 encode in golang code example Example: base64 encode golang sEnc := base64.StdEncoding.EncodeToString([]byte(data)) fmt.Println(sEnc)