Skip to content

Instantly share code, notes, and snippets.

@jordelver
Created October 2, 2012 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • 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