1. Why Base64 Exists
Base64 (RFC 4648) was designed to represent raw arbitrary binary data within textual transport systems that safely handle only human-readable ASCII characters, such as SMTP email bodies, JSON payloads, and XML configurations.
2. Mathematical Mechanics: The 6-Bit Partition
Standard computing uses 8-bit octets (bytes) yielding 256 possible permutations. Base64 compresses three 8-bit bytes (24 bits total) into four 6-bit index groups ($2^6 = 64$ values), mapping each directly to an alphanumeric character set.
3. Bandwidth Overhead and Performance
Because four characters are used to transmit three bytes of source binary data, Base64 encoding inherently incurs an approximate 33% bandwidth overhead. Embedding high-resolution multimedia inside Data URIs increases document size and circumvents browser caching mechanisms.