Many of this utilities are bundled with the "openssl" tool:

  $ echo -n foobar | openssl base64 -e
  Zm9vYmFy