Base64 Character Table
Last updated: February 2026
Complete reference of all 64 Base64 characters defined in RFC 4648, with index values, 6-bit binary representations, and ASCII code points.
What Characters Does Base64 Use?
Base64 uses 64 characters from the ASCII printable set: 26 uppercase letters (A-Z, index 0-25), 26 lowercase letters (a-z, index 26-51), 10 digits (0-9, index 52-61), and 2 symbols (+ at index 62, / at index 63). The = character serves as padding. This 64-character alphabet is defined in RFC 4648 Section 4.
Each character maps to a 6-bit value (0 through 63). During encoding, input bytes are split into 6-bit groups, and each group is replaced by the corresponding character from this table. The full mapping is listed below. To see Base64 encoding in action, use the Base64 text encoder.
Uppercase Letters (Index 0-25)
| Index | Binary | Character | ASCII Code |
|---|---|---|---|
| 0 | 000000 | A | 65 |
| 1 | 000001 | B | 66 |
| 2 | 000010 | C | 67 |
| 3 | 000011 | D | 68 |
| 4 | 000100 | E | 69 |
| 5 | 000101 | F | 70 |
| 6 | 000110 | G | 71 |
| 7 | 000111 | H | 72 |
| 8 | 001000 | I | 73 |
| 9 | 001001 | J | 74 |
| 10 | 001010 | K | 75 |
| 11 | 001011 | L | 76 |
| 12 | 001100 | M | 77 |
| 13 | 001101 | N | 78 |
| 14 | 001110 | O | 79 |
| 15 | 001111 | P | 80 |
| 16 | 010000 | Q | 81 |
| 17 | 010001 | R | 82 |
| 18 | 010010 | S | 83 |
| 19 | 010011 | T | 84 |
| 20 | 010100 | U | 85 |
| 21 | 010101 | V | 86 |
| 22 | 010110 | W | 87 |
| 23 | 010111 | X | 88 |
| 24 | 011000 | Y | 89 |
| 25 | 011001 | Z | 90 |
Lowercase Letters (Index 26-51)
| Index | Binary | Character | ASCII Code |
|---|---|---|---|
| 26 | 011010 | a | 97 |
| 27 | 011011 | b | 98 |
| 28 | 011100 | c | 99 |
| 29 | 011101 | d | 100 |
| 30 | 011110 | e | 101 |
| 31 | 011111 | f | 102 |
| 32 | 100000 | g | 103 |
| 33 | 100001 | h | 104 |
| 34 | 100010 | i | 105 |
| 35 | 100011 | j | 106 |
| 36 | 100100 | k | 107 |
| 37 | 100101 | l | 108 |
| 38 | 100110 | m | 109 |
| 39 | 100111 | n | 110 |
| 40 | 101000 | o | 111 |
| 41 | 101001 | p | 112 |
| 42 | 101010 | q | 113 |
| 43 | 101011 | r | 114 |
| 44 | 101100 | s | 115 |
| 45 | 101101 | t | 116 |
| 46 | 101110 | u | 117 |
| 47 | 101111 | v | 118 |
| 48 | 110000 | w | 119 |
| 49 | 110001 | x | 120 |
| 50 | 110010 | y | 121 |
| 51 | 110011 | z | 122 |
Digits (Index 52-61)
| Index | Binary | Character | ASCII Code |
|---|---|---|---|
| 52 | 110100 | 0 | 48 |
| 53 | 110101 | 1 | 49 |
| 54 | 110110 | 2 | 50 |
| 55 | 110111 | 3 | 51 |
| 56 | 111000 | 4 | 52 |
| 57 | 111001 | 5 | 53 |
| 58 | 111010 | 6 | 54 |
| 59 | 111011 | 7 | 55 |
| 60 | 111100 | 8 | 56 |
| 61 | 111101 | 9 | 57 |
Symbols (Index 62-63)
| Index | Binary | Character | ASCII Code |
|---|---|---|---|
| 62 | 111110 | + | 43 |
| 63 | 111111 | / | 47 |
| Padding | N/A | = | 61 |
What Is the URL-Safe Base64 Alphabet?
RFC 4648 Section 5 defines a URL-safe variant of the Base64 alphabet that replaces 2 characters to avoid conflicts with URL syntax. The + character (index 62) becomes - and the / character (index 63) becomes _. Padding with = is typically omitted. All other 62 characters remain identical.
This variant exists because + is interpreted as a space in URL query strings, / is the path separator in URIs, and = is the key-value delimiter in query parameters. JWT tokens (RFC 7519), filename encoding, and API token transmission all use the URL-safe alphabet. Use the URL-safe Base64 encoder/decoder to convert between the two variants.
| Index | Standard Base64 | URL-Safe Base64 | Reason for Change |
|---|---|---|---|
| 62 | + | - | + means space in URL encoding |
| 63 | / | _ | / is the path separator in URIs |
| Padding | = | Omitted | = is a query string delimiter |
How Does the Base64 Index Map to Binary?
Each Base64 character represents a 6-bit value ranging from 0 (000000) to 63 (111111). The encoding algorithm reads input data 3 bytes (24 bits) at a time, splits those 24 bits into four 6-bit groups, and maps each group to a character from the table above. The decoder reverses this by converting each character back to its 6-bit value.
The 6-bit grouping is the reason Base64 uses exactly 64 characters: 2^6 = 64. This design means every possible 6-bit pattern maps to exactly one printable ASCII character, and every character maps back to exactly one 6-bit pattern. The mapping is bijective. For a detailed walkthrough of the encoding algorithm, see the Base64 algorithm explanation.
For example, the ASCII character M has the byte value 77 (binary 01001101). When encoded alone, the 8 bits are padded to 12 bits (010011 010000), producing 2 Base64 characters: index 19 (T) and index 16 (Q), followed by == padding. The result is TQ==.
What Is the Base64 Padding Character?
The = character is the Base64 padding character. It is appended to the encoded output when the input byte count is not a multiple of 3. Padding ensures the encoded string length is always a multiple of 4 characters, as required by RFC 4648.
Base64 processes input in 3-byte (24-bit) blocks. If the final block contains only 1 byte (8 bits), 2 padding characters (==) are appended. If the final block contains 2 bytes (16 bits), 1 padding character (=) is appended. If the input length is exactly divisible by 3, no padding is needed. The What is Base64 guide covers padding behavior in full detail.
| Input Bytes mod 3 | Remaining Bits | Base64 Characters | Padding |
|---|---|---|---|
| 0 (divisible by 3) | 0 | No extra | None |
| 1 (1 byte remaining) | 8 bits | 2 characters | == |
| 2 (2 bytes remaining) | 16 bits | 3 characters | = |
How Is This Table Used in Base64 Encoding?
The Base64 character table is the lookup mechanism at the core of every Base64 encoder and decoder. During encoding, each 6-bit integer from 0 to 63 is replaced by the corresponding character from this table. During decoding, each character is converted back to its 6-bit integer. The table is used once per character in both directions.
The encoding process follows 4 steps: (1) read 3 input bytes, (2) concatenate them into a 24-bit integer, (3) split into four 6-bit values, (4) look up each value in this table. The Base64 algorithm page provides a step-by-step walkthrough with binary examples. To encode text using this table, try the Base64 text encoder. To decode Base64 back to text, use the Base64 text decoder.
Implementations in every programming language use this same table. The character ordering is defined in RFC 4648 Section 4 and has not changed since the original RFC 1421 in 1993. You can validate any Base64 string to confirm it uses only characters from this table.
Frequently Asked Questions
How many characters are in the Base64 alphabet?
The Base64 encoding alphabet contains 64 printable ASCII characters: 26 uppercase letters (A-Z), 26 lowercase letters (a-z), 10 digits (0-9), and 2 symbols (+ and /). The = padding character is not part of the 64-character alphabet. It is a 65th character used only to pad encoded output to a multiple of 4 characters.
What is the difference between standard and URL-safe Base64 characters?
Standard Base64 uses + (index 62) and / (index 63). URL-safe Base64, defined in RFC 4648 Section 5, replaces + with - and / with _. The padding character = is typically omitted in URL-safe encoding. All other 62 characters (A-Z, a-z, 0-9) are identical between the two variants. Use the URL-safe Base64 tool to convert between formats.
Why does Base64 use letters, numbers, and symbols?
Base64 requires exactly 64 distinct printable ASCII characters because 64 = 2^6, and each character must represent one unique 6-bit binary value. The Latin alphabet provides 52 characters (26 uppercase + 26 lowercase), digits provide 10, and 2 additional symbols (+ and /) reach the required 64. These specific characters were chosen because they exist in virtually all character encodings and are printable on all systems.
Is the Base64 character set case-sensitive?
Yes. Base64 is strictly case-sensitive. Uppercase A has index 0 (binary 000000) and lowercase a has index 26 (binary 011010). These represent different 6-bit values. Changing the case of any character in a Base64 string alters the decoded binary output. Case-insensitive comparison of Base64 strings will produce incorrect results.
What index value does the letter 'A' have in Base64?
The letter A has index 0 in the Base64 alphabet, representing the 6-bit binary value 000000. This means a Base64 string of all A characters decodes to all zero bytes. For example, AAAA decodes to 3 null bytes (0x00 0x00 0x00). The uppercase letters A through Z occupy indices 0 through 25 in sequential order.
Related Base64 Tools
- What is Base64? - Learn the fundamentals of Base64 encoding
- Base64 Algorithm - Step-by-step encoding and decoding process
- URL-Safe Base64 Encoder/Decoder - Convert between standard and URL-safe variants
- Base64 Text Encoder - Encode text to Base64
- Base64 Text Decoder - Decode Base64 back to text
- Base64 Validator - Verify Base64 string correctness
- All Base64 Tools - Browse the complete toolset