What Is Base64?
Base64 is an encoding scheme that converts binary data into a text representation using 64 printable ASCII characters: A-Z, a-z, 0-9, and the symbols + and /. Because it uses only safe, printable characters, Base64 can travel through systems designed for text without corruption. Every three bytes of input become four Base64 characters, which is why encoded output is roughly 33% larger than the original. A developer in Seattle embeds a small PNG logo directly into an HTML file as a Base64 data URI, eliminating an extra HTTP request. That is one of the most common practical uses of Base64 on the web.
Base64 is not encryption. It provides no confidentiality and can be trivially reversed by anyone. Its purpose is transport safety, not security. For encoding URLs, try our URL Encode / Decode tool.
What This Calculator Does
This Base64 calculator lets you encode plain text to Base64 and decode Base64 strings back to plain text. It handles Unicode characters correctly by using UTF-8 encoding and reports clear errors when you paste an invalid Base64 string.
- Inputs: Plain text or a Base64 string, plus a mode selector
- Outputs: Encoded or decoded result with character counts and size overhead
How the Encoding Works
3 bytes (24 bits) → 4 Base64 characters (6 bits each)
The encoder takes the raw bytes of your input, groups them into 24-bit chunks, and splits each chunk into four 6-bit indices. Each index maps to one of the 64 characters in the Base64 alphabet. If the input length is not a multiple of three, padding characters (=) are added so the output length is always a multiple of four. The RFC 4648 standard defines this process precisely.
Common Use Cases
Data URIs: Embed images, fonts, or small files directly in HTML or CSS to reduce HTTP requests. Email attachments: MIME encodes binary attachments as Base64 so they pass through text-only email transport. API tokens: Many authentication schemes transmit credentials as Base64-encoded strings. For generating secure credentials, use our Password Generator.
Limitations
This calculator operates in the browser and handles standard Base64 with UTF-8 text. It does not support URL-safe Base64 variants (which replace + and / with - and _) or streaming encoding of very large files. Base64 is not compression and not encryption. For a full encode/decode tool with separate tabs, see our Base64 Encode / Decode calculator.