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)

IndexBinaryCharacterASCII Code
0000000A65
1000001B66
2000010C67
3000011D68
4000100E69
5000101F70
6000110G71
7000111H72
8001000I73
9001001J74
10001010K75
11001011L76
12001100M77
13001101N78
14001110O79
15001111P80
16010000Q81
17010001R82
18010010S83
19010011T84
20010100U85
21010101V86
22010110W87
23010111X88
24011000Y89
25011001Z90

Lowercase Letters (Index 26-51)

IndexBinaryCharacterASCII Code
26011010a97
27011011b98
28011100c99
29011101d100
30011110e101
31011111f102
32100000g103
33100001h104
34100010i105
35100011j106
36100100k107
37100101l108
38100110m109
39100111n110
40101000o111
41101001p112
42101010q113
43101011r114
44101100s115
45101101t116
46101110u117
47101111v118
48110000w119
49110001x120
50110010y121
51110011z122

Digits (Index 52-61)

IndexBinaryCharacterASCII Code
52110100048
53110101149
54110110250
55110111351
56111000452
57111001553
58111010654
59111011755
60111100856
61111101957

Symbols (Index 62-63)

IndexBinaryCharacterASCII Code
62111110+43
63111111/47
PaddingN/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.

IndexStandard Base64URL-Safe Base64Reason 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 3Remaining BitsBase64 CharactersPadding
0 (divisible by 3)0No extraNone
1 (1 byte remaining)8 bits2 characters==
2 (2 bytes remaining)16 bits3 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