This Base64 cheat sheet explains the alphabet, the padding, and how encoding works. To encode or decode text and data, use the Base64 Encoder and Decoder.
What Base64 is
Base64 turns binary data into plain text using 64 safe characters, so files and bytes can travel through systems that only handle text, such as email, JSON, and data URLs. It is an encoding, not encryption: anyone can decode it.
The Base64 alphabet
The 64 characters map to the values 0 to 63.
| Range | Characters | Values |
|---|---|---|
| Uppercase | A to Z | 0 to 25 |
| Lowercase | a to z | 26 to 51 |
| Digits | 0 to 9 | 52 to 61 |
| Symbols | + and / | 62 and 63 |
The = character is padding, not part of the alphabet.
How encoding works
Base64 takes three bytes at a time, which is 24 bits, and splits them into four groups of six bits. Each six bit group, a value from 0 to 63, becomes one character from the alphabet. That is why Base64 output is about one third larger than the input. When the data does not divide evenly into three, one or two = characters pad the end.
URL safe Base64
Because + and / have special meaning in URLs, a URL safe variant replaces + with – and / with _, so the encoded value can sit in a link or filename without breaking.
Free tool
Frequently asked questions
What characters does Base64 use?
A to Z, a to z, 0 to 9, plus + and /, for 64 characters, with = used only as padding.
Is Base64 encryption?
No. It is a reversible encoding that anyone can decode, so it does not protect data. Use encryption for that.
Why is Base64 larger than the original?
Because it uses four characters for every three bytes, the output is roughly 33 percent bigger than the input.