HOME ABOUT CONTACT ARTICLES

Encoding/Decoding Base64


The Base64 algorithm converts binary data into a table of 64 characters.
It protects binary data from corruption during transmission. This section makes uses of Linux pipes

Remember, it is encode secrets in third party tools, hence use the Bash terminal!

Steps

Encoding

To encode something in Base64, we pipe the output with the command base64

echo "Luke Pritchard" | base64

As an example:

luke@nebulae:~$ echo "Luke Pritchard" | base64
 THVrZSBQcml0Y2hhcmQK


Decoding

To dencode something in Base64, we pipe the encoded text with the command base64 --decode

echo "THVrZSBQcml0Y2hhcmQK" | base64 --decode

As an example:

luke@nebulae:~$ echo "THVrZSBQcml0Y2hhcmQK" | base64 --decode
 Luke Pritchard