❓ What is Base64?
Base64 is a binary-to-text encoding scheme that converts binary data into a sequence of printable ASCII characters. It was designed to allow binary data to be represented in contexts that only support text, such as email or HTML.
Why is it called Base64?
The name comes from the 64-character alphabet it uses: A–Z (26), a–z (26), 0–9 (10), plus + and / — exactly 64 characters.
Common Use Cases
Embedding images in HTML/CSS as Data URIs, encoding email attachments (MIME), storing binary data in JSON, encoding credentials in HTTP Basic Authentication headers.
Base64 is NOT encryption
Base64 is just encoding. Anyone can decode it without a key. Never use it to hide sensitive data.
Example
Input: Hello Output: SGVsbG8=