Base64 Alphabet Reference
Base64 encodes binary data using 64 printable characters, each representing a 6-bit value. Three input bytes (24 bits) map to four output characters.
Index ranges
| Index | Characters |
|---|---|
| 0–25 | A–Z |
| 26–51 | a–z |
| 52–61 | 0–9 |
| 62 | + (standard) / - (URL-safe) |
| 63 | / (standard) / _ (URL-safe) |
Standard vs URL-safe
| Aspect | Standard | URL-safe |
|---|---|---|
| Index 62 | + | - |
| Index 63 | / | _ |
| Padding | = appended | often omitted |
Frequently asked questions
Why does Base64 end with = signs?
Base64 works on 3-byte groups. When the input length is not a multiple of 3, one or two = characters pad the final group so the output stays a multiple of four characters.
What is URL-safe Base64?
A variant that replaces + with - and / with _, so the string is safe in URLs and filenames. Padding is frequently dropped as well.