Base64 Decode Base64 Encode CSS Beautifier Url Encoder Url Decoder Image to Base64 Base64 to Image

Python base64.b64decode()

Decode a Base64 encoded string

Function

base64.b64decode(s[, altchars])

Parameters

s - is the string to decode.
Optional altchars must be a string of at least length 2 (additional characters are ignored) which specifies the alternative alphabet used instead of the + and / characters.

Return value

The decoded string is returned. A TypeError is raised if s were incorrectly padded or if there are non-alphabet characters present in the string.

Example
<<< import base64
<<< encoded = 'YmFzZTY0IGVuY29kZWQgc3RyaW5n'
<<< data = base64.b64decode(encoded)
<<< data
'base64 encoded string'
Github

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

See also:
Python base64.b64encode