Skip to content
uencoder

UUencode Encoding

UUencode (Unix-to-Unix encoding) is the binary-to-text scheme early Unix systems used to transfer binary files over UUCP; it has since been superseded by Base64/MIME.

Purpose

It carried binary files over UUCP links that supported only 7-bit text, and was the de facto standard before MIME.

Mechanism

Every 3 bytes (24 bits) are split into four 6-bit units, each offset by 32 to a printable ASCII value (a space, 0x20, is replaced by a backtick `). Each line is prefixed with its byte count, and the payload is wrapped in begin/end lines.

Use cases

  • Early Usenet binary attachments
  • Binary transport over UUCP mail
  • File exchange on legacy Unix systems
  • Decoding historical mail archives

Examples

  • Input
    Hello
    Output
    begin 644 file.txt\n%2&5L;`\nend

    Simplified illustration

Common errors

Confusing uuencode with xxencode or xxhash
Check the begin line and the 644 permission marker

Related terms

Related tools

References