Base64 Decode Base64 Encode
More Tools
Other tools: Base64 Image Decoder | Base64 Image Encoder | Url Encoder | Url Decoder

Golang DecodeString()

Decode an input String using Base64.

Function

func (enc *Encoding) DecodeString(s string) ([]byte, error)

Parameters

s - The String to be decoded

Return value

DecodeString returns the bytes represented by the base64 string s.

Example
package main
import b64 "encoding/base64"

func main() {
	data := "YmFzZTY0IGVuY29kZWQgc3RyaW5n"
	sDec := b64.StdEncoding.DecodeString(data)
}
Github

https://github.com/base64decode/examples/blob/master/base64decode.go