This command is part of the posix extensions and needs to be imported to be available to the shell.
See Posix Commands
|-w,-wrap||Wraps lines at 76 chars|
|-d,-decode||Decodes base64 (default, encode)|
Without -d, base64 encodes file (or stdin if no file specified) to base64 encoding and writes to stdout.
-w or -wrap specifies to wrap lines at 76 characters (encode only)
-d or -decode decodes instead of encodes and accepts either raw or wrapped base64 as input, and outputs the decoded file on stdout.
echo Hello | base64
echo Hello | base64 | base64 -d
base64 file.dat > file.b64