What Base64 actually does
Base64 takes input three bytes at a time, splits the 24 bits into four 6-bit groups, and maps each group to one of 64 printable characters (A-Z a-z 0-9 + /). The encoded form is always a multiple of 4 chars; = pads the last block when the input isn't a multiple of 3.
The trade-off is size: encoded data is ~33% bigger. The upside is that it survives any channel that strips or rewrites non-printable bytes — which historically was most of email and many APIs.