I want to convert a simple HEX string such as 10000000000002ae to Base 64.
The hex string is to be converted to bytes, and the bytes are then encoded to base64 notation,
In python3, you may use bytes.fromhex to bytes, use base64 package convert bytes to base64
bytes.fromhex
hex_str = '01' encoded_str = base64.b64encode(bytes.fromhex(hex_str)).decode('utf-8') decoded_str = base64.b64decode(encoded_str.encode('utf-8')).hex()