The term Base64 was originated by a specific MIME Type and it refers to a group of binary-to-text encodings to safely represent binary data in ASCII string format by translating into a radix-64 representation, it is aimed to be a transport format across systems that support only text-based communication.
That is one of the reasons why it is so popular on web development, and among other things it enables embedding binary assets like images into HTML web pages and CSS style sheets.
Note that base64 is by no means a compression algorithm the average size of the resulting string is 33% bigger than the original one and can be much bigger if the original is small, so when calculating the necessary size to store information in base64 consider this extra size.
For more detailed information on how it works, specifications, implementation, and history take a look at this article from Wikipedia
Here is an example of what a normal string of text looks like when encoded to base64.
The original string:
And the encoded string in base64:
As mentioned before the resulting string is bigger than the original one.
Since it is a popular method of transporting data, libraries to convert to and from base64 are widely available in basically all modern programming languages, here is a list of the most common:
Among other things it is used for:
It does not always include == at the end of encoded strings, this process is called padding, and usually is not necessary to successfully decode the content, unless the encoded base64 string is concatenating multiple encoded files.
From a data-security perspective, base64 is not safe, given the fact that anyone with access to the base64 string can easily decode back to plain text or binary and access all information.
From a data-store perspective yes, you will not lose information converting to and from base64.
It is based on the data URI Scheme data:[media type][;base64],data
And you use this scheme on the src value of the image tag as the example below:
<img src="data:image/png; base64,base64String" />
We will soon have a base64 converter in Utilitarian tools.