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
HelloOutputbegin 644 file.txt\n%2&5L;`\nendSimplified illustration
Common errors
- Confusing uuencode with xxencode or xxhash
- Check the begin line and the 644 permission marker
Related terms
Base64
Base64 maps arbitrary binary data onto 64 printable ASCII characters (A-Z, a-z, 0-9, +, /) so that binary data can travel over text-only channels. GLOSSARY
MIME Encoding
MIME (Multipurpose Internet Mail Extensions) encoding defines the mechanisms for transporting non-ASCII text and binary attachments in email, including the Base64 and Quoted-Printable content transfer encodings. GLOSSARY
Ascii85
Ascii85 (Base85) maps every 4 bytes (32 bits) to 5 ASCII characters, an expansion of about 25% — lower than Base64's 33% — and is used in PDF and PostScript. GLOSSARY
Related tools
UUencode
UUencode text for Unix-to-Unix transfer. Free, private, 100% client-side. TOOL
UUdecode
Decode UUencoded text. Free, private, 100% client-side. TOOL
Xxencode
Encode text with the xxencode character set (+ - 0-9 A-Z a-z) using 3-to-4 grouping. No standard line-length prefix lines are emitted, so the output may not round-trip with other xxencode implementations. TOOL
Xxdecode
Decode xxencode text produced by this site's XXEncode tool. Standard xxencode output that carries line-length prefix characters is not supported — the prefix would be decoded as data. TOOL