Standard Base64 encoding consists of the following 64-character set. Each 3 bytes (24 bits) of the binary data that you want to encode is translated into four characters from the character set mentioned later. Each translated character is 6 bits in size. In addition to the following characters, the = character is used for padding:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
To understand how the data is translated into Base64 encoding, first, build the Base64 index table by assigning index 0 to 63 to the letters in the character set, as shown here. As per the following table, the index 0 corresponds to the letter A and the index 62 corresponds to +, and so on:

Now, let's say we want to Base64 encode the text "One". To do this, we need to convert the letters to their corresponding bit values, as shown here:
O -> 0x4f -> 01001111
n -> 0x6e -> 01101110
e -> 0x65 -> 01100101
The Base64 algorithm processes 3 bytes (24 bits) at a time; in this case, we have exactly 24 bits that are placed next to each other, as shown here:
010011110110111001100101
The 24 bits are then split into four parts, each consisting of 6 bits and converted to its equivalent decimal value. The decimal value is then used as an index to find the corresponding value in the Base64 index table, so the text One encodes to T25l:
010011 -> 19 -> base64 table lookup -> T
110110 -> 54 -> base64 table lookup -> 2
111001 -> 57 -> base64 table lookup -> 5
100101 -> 37 -> base64 table lookup -> l