The term Base64 is coming from a certain MIME content transfer encoding. Basically, Base64 is a collection of related encoding designs which represent the binary information in ASCII format by converting it into a base64 representation.
Base64 encoding schemes are generally used when there is a need to encode binary information that needs to be stored and transferred over media that are developed to deal with textual information. This guarantees that the data stays unchanged without modification during transfer. Base64 is generally used in a number of applications including electronic mail via MIME, and keeping complex information in XML.
What is Base64 Encoding and why is it used?
Base64 encoding is a way to convert any binary or text data into printable ASCII string format.
It is needed to safely transmit binary data over a transmission protocol/medium that does not support/handle binary data correctly.
Note that, Base64 is not an encryption or compression scheme. It is an encoding scheme that converts binary data like image or file to the ASCII character set.
It is called Base64 because it works with a subset of 64 characters from the ASCII character set. These characters include upper and lowercase alphabets (A-Za-z), digits (0-9), +, and /.
In short, Base64-encoding is a way to encode 8 bit character data in a series of 6 bit characters. This was mostly used in transfering of data across 6 or 7 bit connections. The original RFC for Base64 was the Privacy-enhanced Electronic Mail (PEM) RFC 989 but now numerous variations exists, as well as RFC:s, like the RFC 1421, RFC 2045, RFC 3548, RFC 4848 and several other as well.