Base64 is an encoding scheme that is used to represent binary data in an ASCII string format by
translating it into a radix-64 representation.
The particular set of 64 characters chosen to represent the 64 place-values for the base varies between implementations.
Base64 implementation uses A–Z, a–z, and 0–9 for the first 62 values. The 63rd character is + and 64th char is /. The character = is used as padding character.
For encoding, the each byte of data is converted into binary representation. Now the binary representation is grouped in sextets (6 bit each). Each of the 6 bits is converted back to a decimal representation. For each of decimal value, the associated ASCII character is picked. The padding characters might be added to make the last encoded block contain four Base64 characters.
Base64 is designed to carry data stored in binary formats across channels that only reliably support text content. Base64 is particularly to embed image files or other binary assets inside textual assets such as HTML and CSS files.
The following table illustrates how an input data is converted to base64.
For example the base-64 encoding for the word "Cat".
|ASCII coded decimal||67||97||116|
|ASCII coded binary||01000011||01100001||01110100|
|Join 3 bytes into a 24-bit string||010000110110000101110100|
|Create group of 6 bits||010000 110110 000101 110100|
|Convert binary to decimal||16, 54, 5, 52|
Using this tool very straightforward simply enter the input data(text or binary) and press the Encode or Decode button to encode or decode the input data.