Skip to content
Toolcroft

Encoding Tools

UUencode / UUdecode - Encode & Decode UU Online

Encode text or data to UU format and decode UU-encoded content back to plain text. Classic Unix uuencoding implemented entirely in your browser.

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. The asterisk (*) at the start of the second line encodes 10 bytes (ASCII 42 − 32 = 10 -> actually 5 in this example).
  • Backtick line: a line containing only a backtick signals the end of data.
  • end: the footer marker.

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