Skip to content

Instantly share code, notes, and snippets.

@aspitz
Created August 13, 2013 12:42
Show Gist options
  • Save aspitz/6220724 to your computer and use it in GitHub Desktop.
Save aspitz/6220724 to your computer and use it in GitHub Desktop.
Encode/decode a binary file into/out of base64 from the command line
To encode
> base64 -i [source.binary] -o [destination.base64]
To decode
> base64 -D -i [source.base64] -o [destination.binary]
To encode directly into the clipboard
> base64 < [source.binary] | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment