binascii.a2b_base64()
binascii.a2b_base64() is a Python function in the Binascii Module category. Converts base64 ASCII string to bytes (alternative to base64.b64decode). The syntax is binascii.a2b_base64(data). Returns: Bytes. A typical example: binascii.a2b_base64(b"aGVsbG8=") # b"hello". A close sibling is binascii.hexlify(), which converts bytes to hexadecimal representation (like bytes.hex()). A close sibling is binascii.unhexlify(), which converts hexadecimal representation back to bytes. A close sibling is binascii.crc32(), which computes CRC-32 checksum of data (for error detection, not security). A close sibling is binascii.b2a_base64(), which converts bytes to base64 ASCII string. More about this category: Binary data conversions — hexlify, unhexlify, crc32, base64. Related Binascii Module entries: binascii.hexlify(), binascii.unhexlify(), binascii.crc32(), binascii.b2a_base64(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try binascii.a2b_base64() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.