Term Base64 initiated from a precise MIME(Multipurpose Internet Mail Extension) content Transfer encoding. Base64 is a part of a group of binary-to-text encoding schemes which represent binary data in an ASCII string format by translating it into a radix-64 format.
Computer understand and communicate in 0s and 1s - Binary. however there is a need to send rich data likes images, audios, videos. so as to transfer this kind of rich data between the computers it needs to encoded to 0s and 1s first and need to send across. Destination computer needs to decoded the data. There are many ways to encode and decode the data. It would be easy that all are agree for universal encoding. But that's not happening.
There are lots on encoding created by many people and organizations. Later on ASCII became the universal standards wit 7 bits per character. But computer stores 8 bits of binary data per character. So ASCII is not suitable to transferring 8 bits of data.
Base64 encoding was invented and introduced to solve this problem. Base64 encoding helps to encode bytes to bytes which is very safe to transfer with out losing or corrupting. There is a small disadvantage of Base64 encoding is that it becomes lengthy. It uses 33% extra storage.