Skip to content
Toolcroft

UUencode / UUdecode - Encode & Decode UU Online

Encoding Tools

Encode text or files as UU format and decode UU-encoded text or binary files with filename and mode details. Runs entirely in your browser.

Three octal digits, such as 644 or 755.

Files are read and converted on this device. Nothing is uploaded. Files up to 25 MB are supported.

How to use this tool

  1. Select Encode or Decode. You can type or paste text, or load a local file in either mode.
  2. For encoding, set the output filename and three-digit octal mode. For decoding, provide a UU block with begin and end lines.
  3. Copy or download encoded text, or inspect the decoded filename, mode, and byte count before downloading the decoded file.

UUencode / UUdecode

UUencoding (Unix-to-Unix encoding) is one of the earliest binary-to-text encoding schemes. It was invented in the 1980s to allow binary files to be sent over early email and Usenet systems that only supported 7-bit ASCII text.

Output format

UU-encoded output starts with a begin line containing the Unix permission mode and filename, followed by encoded data lines, a line containing a backtick, and finally an end line. Each data line is prefixed with a character indicating the number of bytes encoded in that line.

Modern alternatives

For new applications, Base64 is the preferred encoding. It is standardized in RFC 4648, widely supported, and produces slightly shorter output (33% overhead vs ~35% for UU). UUencode is mainly useful for working with legacy systems and historical content.

Historical context

UUencoding was developed around 1980 by Mary Ann Horton as part of the uucp (Unix-to-Unix Copy) network protocol, which predated the modern internet. It was the primary method for sending binary files over early email and Usenet (NNTP) systems that only transported 7-bit ASCII. Multi-part Usenet posts encoding software, images, and audio were ubiquitous through the late 1980s and early 1990s. MIME with Base64 attachments largely replaced UUencoding by 1995.

File format walkthrough

A complete UU-encoded file looks like this (encoding the 5 ASCII bytes “hello”):

begin 644 hello.txt
%:&5L;&\`
`
end
  • begin 644 hello.txt: the header line. 644 is the Unix file permission mode (owner rw, group r, other r). The filename follows.
  • Data lines: each line starts with a character whose ASCII value minus 32 gives the number of bytes encoded on that line. Five bytes use % because its ASCII value is 37, and 37 − 32 = 5.
  • Backtick line: a line containing only a backtick signals the end of data.
  • end: the footer marker.

Each data line carries up to 45 original bytes, represented by 60 encoded characters after its length marker. This tool handles both UTF-8 text and arbitrary local file bytes: for example, an old UU-encoded image can be decoded and downloaded even when its bytes are not readable text. The header’s filename and permission mode are shown with the decoded byte count. The permission mode is metadata from the UU block; downloading a file does not apply Unix permissions on your device. UU blocks need their begin and end framing, although surrounding mail text is allowed.

UU vs. Base64 comparison

PropertyUUencodingBase64 (RFC 4648)
Character set size64 printable ASCII64 printable ASCII
Size overhead~35%~33%
Header/footerbegin/end with filename and modeNone (MIME adds its own)
Line lengthFixed 60-char data lines76-char lines in MIME
RFC statusNo active RFC; historically documentedRFC 4648 (current)
Library supportLimited; mostly legacyUniversal

Frequently asked questions

What is UUencoding?

UUencoding (Unix-to-Unix encoding) is a binary-to-text encoding scheme that was widely used in the early days of the internet to attach binary files to Usenet posts and email. It converts binary data to printable ASCII characters.

How does UUencoding work?

Every three bytes of input (24 bits) are split into four 6-bit groups. Each group is offset by 32 and mapped to a printable ASCII character. Lines are prefixed with a character indicating how many bytes that line encodes.

Is UUencoding still used today?

UUencoding has largely been replaced by Base64 in modern systems. It is still encountered in legacy systems, old email archives, and Usenet content.

Can this tool decode binary files?

Yes. It shows decoded UTF-8 as text and lets you download any decoded bytes as a file, including bytes that are not valid UTF-8. Decoding and file handling happen in your browser.

Browse all encoding tools