Encode a string using Base64.
base64.b64encode(bytes[, altchars])
- bytes is the data to be encoded (must be a bytes-like object).
- The optional altchars parameter must be a bytes-like object of at least two characters and defines an alternative alphabet to replace the + and / characters.
Returns the Base64-encoded bytes. A TypeError
is raised if the input is not a bytes-like object.
<<< import base64
<<< text = 'base64 string'
<<< encoded = base64.b64encode(text)
<<< encoded
Home Page Base64encode List Privacy Policy About Us Contact
This website uses cookies to enhance your experience, personalize content and ads, and analyze our traffic.
©2025 Design by base64encodeonl.com