OpenSSL provides us with command line utilities. To perform Base64 encoding we use enc command with -base64 option or -a for short. The tool is not restricted to work with any particular format although I rarely use it for something other than encoding an image.