import base64 plain_str = 'SGVsbG8gV29ybGQ=' bytes_repr = bytes(plain_str, encoding='utf-8') decoded_string = base64.b64decode(bytes_repr) message = str(decoded_string, encoding='utf-8') print(message)