Base64 is an encoding scheme that converts binary data into a set of 64 printable characters, making it safe to transmit over systems that can only handle text. It is commonly used in email (MIME) and other protocols that support only 7-bit data.
-
The input data is split into 6-bit chunks. If the final group has fewer than 6 bits, zeros are added to complete it.
-
Each 6-bit group is mapped to a character using a Base64 table. If the final output has fewer than 4 characters,
=
symbols are added as padding.