base64 decode python script code example
Example 1: decode base64 python
import base64
msg = base64.b64decode(msg)
Example 2: base64 decode python
>>> import base64
>>> encoded = base64.b64encode(b'data to be encoded')
>>> encoded
b'ZGF0YSB0byBiZSBlbmNvZGVk'
>>> data = base64.b64decode(encoded)
>>> data
b'data to be encoded'
Example 3: base64 python decode
import base64
coded_string = '''Q5YACgA...'''
base64.b64decode(coded_string)