string to byte for golang online code example Example: go string to byte array b := []byte("ABC€") s := string([]byte{65, 66, 67, 226, 130, 172})