What Base64 encoding does
Binary image data cannot travel safely through text-only channels — JSON payloads, XML, CSS url() values, and database text fields. Base64 represents every three bytes as four ASCII characters from a safe alphabet. Decoders reconstruct the original bytes on the other side.
An image encoded as Base64 grows roughly 33% compared to the binary file. That overhead is acceptable for tiny icons and tracking pixels but expensive for large photos.
Configuration files, serverless function bundles, and mobile app JSON sometimes embed small images as text for portability. Base64 keeps those payloads self-contained when a separate image URL is awkward or blocked by offline-first packaging constraints.
Treat encoded strings like source code: review diffs carefully because a one-character typo breaks the entire image at runtime.