Encode string to base64
echo 'some text' | base64
Decode base64
echo 'c29tZSB0ZXh0Cgo=' | base64 -d
Encode file
base64 -i some-file.txt -o some-file.base64
Decoding file
base64 -d -i some-file.base64 -o some-file.txt
Cheatsheet collection for go, rust, python, shell and javascript.
Encode string to base64
echo 'some text' | base64
Decode base64
echo 'c29tZSB0ZXh0Cgo=' | base64 -d
Encode file
base64 -i some-file.txt -o some-file.base64
Decoding file
base64 -d -i some-file.base64 -o some-file.txt