The basic idea
Base64 is a way to represent binary data using only printable ASCII characters. It maps every 3 bytes of input to 4 characters from a 64-character alphabet (A–Z, a–z, 0–9, +, /) with = used for padding.
Because the output is plain text, base64 survives email gateways, JSON APIs, XML, and URL-adjacent transports that would corrupt raw bytes.
Why it matters
Developers encounter base64 when APIs embed images, when email sends attachments as text, when CSS uses data: URIs, and when JWT tokens carry signed payloads. Decoding restores the original bytes — a PDF, PNG, ZIP, or JSON document.
