Skip to content

Instantly share code, notes, and snippets.

@jordelver
Created October 2, 2012 14:24
Show Gist options
  • Save jordelver/3819526 to your computer and use it in GitHub Desktop.
Save jordelver/3819526 to your computer and use it in GitHub Desktop.
base64 encoding and decoding

base64 encoding and decoding

Useful for decoding email message attachments

Source: http://superuser.com/questions/120796/os-x-base64-encode-via-command-line

To decode from Base64

openssl base64 -d -in <infile> -out <outfile>

OR

cat <filename> | openssl base64 -d

To encode to Base64

openssl base64 -in <infile> -out <outfile>

openssl is installed by default on Mac OS X

@stokito
Copy link

stokito commented Jan 20, 2022

I gathered some list of possible bas64 solutions https://gist.github.com/stokito/18ce554bd53bdb6355670066d5ae9943

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment