base64.urlsafe_b64decode()
base64.urlsafe_b64decode() is a Python function in the Base64 Module category. URL-safe base64 decoding. The syntax is base64.urlsafe_b64decode(s). Returns: Decoded bytes. A typical example: base64.urlsafe_b64decode(b"aGVsbG8/d29ybGQ=") # b"hello?world". A close sibling is base64.b64encode(), which encodes bytes-like object to base64 bytes. A close sibling is base64.b64decode(), which decodes base64 bytes back to original bytes. A close sibling is base64.urlsafe_b64encode(), which uRL-safe base64 encoding (+ → -, / → _). A close sibling is base64.b32encode(), which encodes bytes to base32. More about this category: Base64/base32/base16 encoding — b64encode, b64decode, urlsafe. For a broader walkthrough, read the Base64 Module guide. Related Base64 Module entries: base64.b64encode(), base64.b64decode(), base64.urlsafe_b64encode(), base64.b32encode(), base64.b16encode(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try base64.urlsafe_b64decode() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.