Base64 encode/decode data.

Synopsis

base64 [OPTION]... [FILE]

Description

Encodes or decodes FILE, or standard input if none is given, to standard output using the base64 alphabet.

Options

-d, --decode Decode data.

-w, --wrap=COLS Wrap encoded lines after COLS characters (default 76, 0 to disable).

--help Display help and exit.

Examples

$ base64 image.png > image.b64

Encode a file to base64.

$ base64 -d image.b64 > image.png

Decode a base64 file back to binary.

$ echo -n hello | base64

Encode a string.

See Also

xxd, md5sum