Base64 Encode / Decode Calculator
Encode any text to Base64 or decode a Base64 string back to text — full UTF-8 support, done with the standard RFC 4648 alphabet.
How it works
Base64 (RFC 4648): 3 bytes (24 bits) → 4 characters of 6 bits each, from A–Z a–z 0–9 + / · trailing group padded with "="
Base64 turns arbitrary bytes into plain text so binary data can travel through channels that only accept ASCII — email bodies, JSON strings, data: URLs. It reads the input three bytes (24 bits) at a time and re-slices those 24 bits into four 6-bit groups, each mapped to one of 64 printable characters. When the input is not a multiple of three bytes, the final group is padded with one or two "=" signs. Text is first turned into UTF-8 bytes, so accented and multibyte characters encode correctly; the output is always about one-third larger than the input.
Worked example
Encoding "Man" (bytes 77, 97, 110) gives the 24-bit value 010011010110000101101110, split into 010011 / 010110 / 000101 / 101110 = 19, 22, 5, 46 → "TWFu". "Hello, World!" (13 bytes) encodes to "SGVsbG8sIFdvcmxkIQ==", with two padding characters because 13 is one more than a multiple of three.
Sources: RFC 4648 — The Base16, Base32, and Base64 Data Encodings
Frequently asked questions
Is Base64 encryption?
No — it is encoding, not encryption. Anyone can decode a Base64 string instantly with no key, which this tool does. It exists to represent binary data as text safely, not to hide it; never use it to protect passwords or secrets.
Why does my encoded string end in "=" or "=="?
Base64 works in blocks of three input bytes. When the last block has only one or two bytes, the output is padded with "==" or "=" respectively so the length stays a multiple of four. A string with no leftover bytes has no padding at all.
Does it handle emojis and accented letters?
Yes. The text is converted to UTF-8 bytes first, so multibyte characters like é, 你 or 😀 encode and round-trip correctly. Decoding reverses the process, turning the bytes back into the original Unicode text.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.