Web Analytics

Python base64.b64encode() Method

Encoding Base64 Encode

The base64.b64encode() method encodes a bytes-like object using Base64.

It returns the encoded bytes.

Syntax

base64.b64encode(s)

Parameters

Parameter Description
s Required. The byte string to encode.

Return Value

The encoded bytes.

Example

Using the b64encode() method:

Output
Click Run to execute your code

Related Functions