# phpman > man > uuencode(1)

> **TLDR:** Encode binary files into ASCII for transport via mediums that only support simple ASCII encoding.
>
- Encode a file and print the result to `stdout`:
  `uuencode {{path/to/input_file}} {{output_file_name_after_decoding}}`
- Encode a file and write the result to a file:
  `uuencode -o {{path/to/output_file}} {{path/to/input_file}} {{output_file_name_after_decoding}}`
- Encode a file using Base64 instead of the default uuencode encoding and write the result to a file:
  `uuencode {{-m|--base64}} -o {{path/to/output_file}} {{path/to/input_file}} {{output_file_name_after_decoding}}`

*Source: tldr-pages*

---

[uuencode(1)](https://www.chedong.com/phpMan.php/man/uuencode/1/markdown)                                 User Commands                                [uuencode(1)](https://www.chedong.com/phpMan.php/man/uuencode/1/markdown)



## NAME
       **uuencode** - encode a file into email friendly text

## SYNOPSIS
       **uuencode** [**-flags**] [**-flag** [_value_]] [**--option-name**[[=| ]_value_]] [<in-file>] <output-name>


## DESCRIPTION
       _uuencode_  is  used to create an ASCII representation of a file that can be sent over channels
       that may otherwise corrupt the data.  Specifically, email cannot handle binary data and  will
       often even insert a character when the six character sequence "0rom " is seen.

       _uuencode_ will read _in-file_ if provided and otherwise read data from standard in and write the
       encoded form to standard out.  The output will begin with a header line for use  by  _uudecode_
       giving  it  the  resulting suggested file _output-name_ and access mode.  If the _output-name_ is
       specifically _/dev/stdout_, then _uudecode_ will emit the decoded file to standard out.

       **Note**: _uuencode_ uses buffered input and assumes that it is not hand typed  from  a  tty.   The
       consequence is that at a tty, you may need to hit Ctl-D several times to terminate input.

## OPTIONS
### -m --base64
              convert using base64.

              By  default,  _uuencode_ will encode using the traditional conversion.  It is slower and
              less compact than base64.  The encoded form of the file is expanded by 37% for UU  en‐
              coding and by 35% for base64 encoding (3 bytes become 4 plus control information).

### -e --encode-file-name
              encode the output file name.

              Since  output  file  names may contain characters that are not handled well by various
              transmission modes, you may specify that the _output-name_ be base64  encoded  as  well.
              (Traditional uuencoding of the file name is not supported.)

### -h --help
              Display usage information and exit.

       **-!**, **--more-help**
              Pass the extended usage information through a pager.

### -R --save-opts
              Save  the  option state to _cfgfile_.  The default is the _last_ configuration file listed
              in the **OPTION** **PRESETS** section, below.  The command will exit after updating the config
              file.

### -r --load-opts --no-load-opts
              Load  options from _cfgfile_.  The _no-load-opts_ form will disable the loading of earlier
              config/rc/ini files.  _--no-load-opts_ is handled early, out of order.

### -v --version
              Output version of program and exit.  The default mode is `v', a simple  version.   The
              `c'  mode  will  print copyright information and `n' will print the full copyright no‐
              tice.

## OPTION PRESETS
       Any option that is not marked as _not_ _presettable_ may be preset by loading values from config‐
       uration ("RC" or ".INI") file(s).  The file "_$HOME/.sharrc_" will be used, if present.

## STANDARDS
       This implementation is compliant with P1003.2b/D11.

## FILES
       See **OPTION** **PRESETS** for configuration files.

## EXIT STATUS
       One of the following exit values will be returned:

       0  (EXIT_SUCCESS)
              Successful program execution.

       1  (EXIT_FAILURE)
              The operation failed or the command syntax was not valid.

       66  (EX_NOINPUT)
              A specified configuration file could not be loaded.

       70  (EX_SOFTWARE)
              libopts   had   an   internal   operational  error.   Please  report  it  to  autogen-
              <users@lists.sourceforge.net>.  Thank you.

## SEE ALSO
       [uudecode(1)](https://www.chedong.com/phpMan.php/man/uudecode/1/markdown), [uuencode(5)](https://www.chedong.com/phpMan.php/man/uuencode/5/markdown)

## HISTORY
       The **uuencode** command first appeared in BSD 4.0.

## AUTHORS
       Free Software Foundation, Inc.

## COPYRIGHT
       Copyright (C) 1994-2015 Free Software Foundation, Inc. all rights reserved.  This program  is
       released under the terms of the GNU General Public License, version 3 or later.

## BUGS
       Please  put **sharutils** in the subject line for emailed bug reports.  It helps to spot the mes‐
       sage.

       Please send bug reports to: <bug-gnu-utils@gnu.org>

## NOTES
       This manual page was _AutoGen_-erated from the **uuencode** option definitions.



GNU sharutils (4.15.2)                       30 May 2015                                 [uuencode(1)](https://www.chedong.com/phpMan.php/man/uuencode/1/markdown)
