base64 — Encode Binary Data with ASCII — PyMOTW 3
Originally posted
· 1 min read
The base64, base32, base16, and base85 encodings convert 8 bit bytes to values that fit inside the ASCII range of printable characters, trading more bits to represent the data for compatibility with systems that only support ASCII data, such as SMTP. The base values correspond to the length of the alphabet used in each encoding. There are also URL-safe variations of the original encodings that use slightly different alphabets.
This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.