It is used to transmit attachments via email over the Simple Mail Transfer Protocol (SMTP).
You should use Base64 encoding whenever you intend to transmit binary data in a textual format.
Multi-Purpose Internet Mail Extensions (MIME) Base64 encoding is the most common, and is based on the RFC 1420 specification.
It also uses a = character at the end of a string to signify whether the last character is a single or double byte.