Base64 is a binary-to-text encoding scheme defined by RFC 4648. It represents binary data using a set of 64 printable ASCII characters: A–Z, a–z, 0–9, +, and /, with = used for padding. This makes it safe to embed binary data inside text-based formats like JSON, XML, HTML, CSS, and email (MIME).
Common use cases include encoding images as data URIs, transmitting binary data in API payloads, encoding email attachments (MIME), and storing binary data in text-only databases or configuration files.
Base64 encoding increases data size by approximately 33% (every 3 bytes of input become 4 bytes of output). It is not encryption — anyone can decode Base64 without a key.