Base64 Encode And Decode In Python

Base64 Encoding

Base64 is an encoding method, where any data/images/audio file can be converted to binary data. And converted data can pass over the network without any data/image/audio loss

Base64 Decoding

This method is revers of base64 encoding, when received at other end, through network. Decode it and process data/image/audio files for the next specific requirement

Base64 encoding in Python

encoded_bytes = "TestString".encode()
print(encoded_bytes)

Base64 decoding in Python

decoded_string =  encoded_bytes.decode()
print(decoded_string)