Base64 Encode & Decode
Convert text to Base64 and back — UTF-8 safe, so accents and emoji survive the round trip.
Base64 turns any text or data into a 64-character ASCII set so it travels safely through systems that only handle plain text. Encoding “Hello” gives SGVsbG8=. To decode, paste SGVsbG8= and switch to Decode to get “Hello” back. It is reversible encoding, not encryption — anyone can decode it.
What Base64 is
Base64 is a way of writing arbitrary bytes using only 64 printable ASCII characters — the letters A–Z and a–z, the digits 0–9, plus “+” and “/”. Because those characters survive email, URLs, JSON, and other text-only channels untouched, Base64 is the standard way to embed binary data (images, keys, attachments) inside text formats. It does not hide or protect the data; it only repackages it.
Every 3 input bytes map to exactly 4 output characters.
How the mapping works
Base64 reads the input three bytes at a time. Three bytes are 24 bits, and 24 splits evenly into four 6-bit groups. Each 6-bit group is a number from 0 to 63, which selects one character from the Base64 alphabet. When the input does not divide neatly by three, the final group is padded with zero bits and the output is padded with one or two “=” characters so the length stays a multiple of four.
- 1 Choose Encode. The Encode segment reads your text and produces Base64.
- 2 Type or paste your text. Enter Hi. Its UTF-8 bytes are H = 72 and i = 105.
- 3 Group the bits into sixes. The 16 bits 01001000 01101001 are padded and regrouped into 010010 000110 100100.
- 4 Map each group to a character. The values 18, 6, and 36 become S, G, and k from the Base64 alphabet.
- 5 Add padding. Two bytes fill only three of four output slots, so one “=” is appended: Hi → SGk=.
The Base64 alphabet
Each 6-bit value (0–63) maps to one character; “=” is padding, not a value.
| Index range | Characters | Notes |
|---|---|---|
| 0–25 | A–Z | Uppercase letters, A = 0 |
| 26–51 | a–z | Lowercase letters, a = 26 |
| 52–61 | 0–9 | Digits, 0 = 52 |
| 62 | + | Plus sign |
| 63 | / | Forward slash |
| (none) | = | Padding to keep length a multiple of 4 |
Encoding is not encryption
Base64 offers no security at all — there is no key, and the transformation is public, so anyone can decode it instantly. Never use it to protect passwords or private data; for that you need real encryption. Be aware too that Base64 inflates size by roughly 33%, because every 3 bytes of input become 4 characters of output. That overhead is the price of making binary data safe to paste into text-only places.