I did comment base64 command line in http://wiki.opensslfoundation.com/index.php?title=Command_Line_Utilities.
So I issue a Warning when using openssl base64 decoding :
openssl base64 -e <<< 'Welcome to openssl wiki'
V2VsY29tZSB0byBvcGVuc3NsIHdpa2kK
openssl base64 -d <<< 'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kK'
Welcome to openssl wiki
warning base64 line length is limited to 64 characters by default in openssl :
openssl base64 -e <<< 'Welcome to openssl wiki with a very long line
that splits...'
V2VsY29tZSB0byBvcGVuc3NsIHdpa2kgd2l0aCBhIHZlcnkgbG9uZyBsaW5lIHRo
YXQgc3BsaXRzLi4uCg==
openssl base64 -d <<< 'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kgd2l0aCBhIHZlcnkgbG9uZyBsaW5lIHRoYXQgc3BsaXRzLi4uCg=='
=> NOTHING !
to be able to decode a base64 line without line feed that exceed 64 characters use -A option :
openssl base64 -d -A <<<
'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kgd2l0aCBhIHZlcnkgbG9uZyBsaW5lIHRoYXQgc3BsaXRzLi4uCg=='
Welcome to openssl wiki with a very long line that splits...
This is anyway better to actualy split base64 result in 64 characters lines since -A option is BUGGY ( limit with long files ).
base64 -d <<< QWxhZGRpbjpvcGVuIHNlc2FtZQ==– jmk Jul 29 '15 at 11:23echo QWxhZGRpbjpvcGVuIHNlc2FtZQ== | "C:\Program Files\Git\usr\bin\base64" --decode 2> nul > example.txtOn Windows with git's base64. – Fire Sep 19 '16 at 18:03Just use, because many people know about thebase64program – but as one can't just insert a string as command line option, it is hard to get the syntax right for users who touch the CLI only once in a while. – feeela Nov 15 '16 at 14:04pbpaste | base64 --decode. – Marián Černý Sep 21 '17 at 11:15\nin the decoded string so you probably want to doecho -e. More info here – AlikElzin-kilaka Oct 09 '18 at 12:44-w 0when encoding. I like this as it makes it easier to decode at the shell. – verboze Feb 21 '19 at 16:54$or!– Marcello de Sales Mar 19 '22 at 02:21