base64_decode

Decode a Base64 encoded string.

See base64_encode for Base64 encoding.

This function does not generate a change.

Function

base64_decode(encoded)

Arguments

Argument Type Description
encoded str/bytes The string value to decode.

Return value

Decoded bytes value is returned.

Example

This code shows an example for base64_decode:

encoded = 'YmFzZTY0IGVuY29kZWQgc3RyaW5n';

// decode
data = base64_decode(encoded);

// result is of type bytes
assert(type(data) == 'bytes');

// return as string
str(data);

Return value in JSON format

"base64 encoded string"