Base64 encode/decode files or standard input/output.
base64 encodes or decodes FILE, or standard input, to standard output.
base64 [OPTION]... [FILE]
-d, --decode # Decode data
-i, --ignore-garbage # When decoding, ignore non-alphabetic characters
-w, --wrap=COLS # Wrap encoded lines after COLS character (default 76). Use 0 to disable line wrapping
--help # Display this help and exit
--version # Output version information and exit
Encode a string:
printf foo | base64
Encode a file:
base64 file
Decode a string:
printf Zm9v | base64 -d
Decode a file:
base64 -d file