all Python 3base64function
base64.standard_b64decode()
Base64
Decodes Base64 with the standard alphabet: the same as b64decode without altchars and with validate=False.
Syntax
base64.standard_b64decode(s)
There is no strict check here and no way to enable one: foreign characters, including '-' and '_' from the URL-safe variant, are dropped silently. If the input may come in either alphabet, or you need garbage rejected, use b64decode(s, validate=True) or urlsafe_b64decode.
Examples
import base64
print(base64.standard_b64decode(b'+/8=')) # → b'\xfb\xff'
print(base64.standard_b64decode(b'aGk/ Pg==')) # → b'hi?>' — пробел выброшен
See also
Open in the full glossarydocs.python.orgReport an inaccuracy