How to Encode and Decode with Base64 and OpenSSL

Encode a string to Base64:

$ echo -n "encode me" | openssl enc -base64

Note: -n removes the newline character added by "echo".

Decode a base64 to a string:

$ echo "ZW5jb2RlIG1lCg==" | openssl enc -base64 -d
No votes yet