How the encoding works
Base64 regroups bits. Three bytes are 24 bits, and 24 divides evenly into four groups of six. Each six-bit group is a number from 0 to 63, which indexes into the 64-character alphabet: A-Z, then a-z, then 0-9, then + and /.
That is the entire algorithm. There is no compression, no transformation of the data, and nothing that depends on what the bytes mean.
input: M a n
bytes: 01001101 01100001 01101110
regroup: 010011 010110 000101 101110
values: 19 22 5 46
output: T W F uBecause four output characters always encode three input bytes, the size increase is exactly 4/3, or about 33 percent before padding.