manpagez: man pages & more
info coreutils
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.5 base64: Transform data into printable data.

base64 transforms data read from a file, or standard input, into (or from) base64 encoded form. The base64 encoded form uses printable ASCII characters to represent binary data, see RFC 3548. Synopses:

base64 [option]… [file]
base64 --decode [option]… [file]

The base64 encoding expands data to roughly 133% of the original.

The program accepts the following options. Also see Common options.


During encoding, wrap lines after COLS characters. This must be a positive number.

The default is to wrap after 76 characters. Use the value 0 to disable line wrapping altogether.


Change the mode of operation, from the default of encoding data, to decoding data. Input is expected to be base64 encoded data, and the output will be the original data.


When decoding, newlines are always accepted. During decoding, ignore unrecognized bytes, to permit distorted data to be decoded.

An exit status of zero indicates success, and a nonzero value indicates failure.

© 2000-2021
Individual documents may contain additional copyright information.