What is base64 encoding?
Base64 encoding takes a string of 8-bit bytes, and converts them into a longer string
of
characters which contains only the following characters: A–Z, a–z, 0–9, + symbol,
and / symbol.
The = symbol is used as a special suffix code depending on the length of your input
string.
Base64 Encoding and Decoding is not an encryption scheme, and you should never use
it for this purpose. Base64 encoding is just a means to safely transfer ASCII
data.
To convert to a Base64 encoded form, you are basically just taking a sequence of
24bit buffers, and copying 3 bytes worth of data from the input string into that
buffer. Then you split that 3 byte buffer into 6bit chunks, you will have
4 chunks. Each chunk is used as an index into the table of safe characters.
To decode you just do the opposite.
Enter a string to Base64 encode:
Enter a string to Base64 decode:
|