ID EN
Base64

urlsafe_b64encode

Python 3.11

Encode bytes-like object s using the URL- and filesystem-safe alphabet, which substitutes - instead of + and _ instead of / in the standard Base64 alphabet, and return the encoded bytes. The result can still contain =.

Syntax

PYTHON
base64.urlsafe_b64encode(s)

See Also

bytes-like object bytes