Base64 is an encoding scheme to allow binary files to be represented using ASCII text.
Base64 uses all printable characters to encode the data. There are 64 characters used which is where the name comes from. 64 characters need 6 bits of binary data to represent them and thus an 8 bit binary byte of data must be expanded in size. 4 characters are used to represent 3 bytes of data thus increasing the file size by 33%. The actual increase is more like 37% for email due to the need to limit line lengths to 72 characters adding line end and line feed characters plus the inclusion of header data.
Base64 is used to transmit binary data (such as ZIP files and images) inside of email documents, for RTF images, AbiWord (ABW) images, and FB2 images. It is also used in Data URI to allow images to be included inside an HTML document. It is a MIME (Multipurpose Internet Mail Extensions) encoding standard for data transfer. The mapping usually uses the uppercase letters, the lowercase letters, and 0-9. However, this only gets to 62 characters. The last two vary depending on the implementation with + and / as popular favorites. Since there is no guarantee that there will be an exact match of the number of bytes to the number of characters the "=" sign is used to pad the field when needed. When the decode encounters the "=" it knows the input data has ended. Data can be split over multiple files and concatenated together prior to the decode. Some tools automatically split large files.
 The Base64 index table:
 Similar Coding schemes
Other attempts to code 8 bit and even Unicode data into 7 bit ASCII include:
- https://en.wikipedia.org/wiki/Percent-encoding mostly used in URL and filenames.
- https://en.wikipedia.org/wiki/MIME MIME is the email standard, uses a keyword MIME at the beginning of the message.