UUEncode & UUDecode

What is UUEncoding?

UUEncoding (Unix-to-Unix encoding) is a binary-to-text encoding method that was historically used to transmit binary data through text-based communication systems, particularly email and UUCP (Unix-to-Unix Copy Program). It encodes binary data using only printable ASCII characters, making it safe for transmission through systems that might corrupt or strip non-text data.

UUEncoding predates Base64 and was widely used in early Unix systems and Usenet newsgroups before MIME became the standard for email attachments.

How UUEncoding Works

Encoding Process: UUEncoding takes binary data and converts it into a text format using a 64-character set consisting of printable ASCII characters from space (32) to underscore (95). Each line starts with a character indicating the number of bytes encoded in that line, followed by the encoded data. The format begins with a "begin" line specifying permissions and filename, and ends with an "end" line.

Character Mapping: UUEncoding uses ASCII characters 32-95, where each character represents a 6-bit value. Three input bytes (24 bits) are encoded as four output characters, similar to Base64 but with a different character set and line structure.

  • Uses ASCII characters 32-95 (space through underscore)
  • Encodes data in lines of up to 45 bytes each
  • Each line starts with a length character
  • Includes "begin" header with permissions and filename
  • Ends with "`" (empty line marker) and "end"
  • Approximately 35% larger than original binary data

UUEncoding Output Format

This tool outputs UUEncoded data in a simplified format - just the encoded data lines without the traditional "begin" and "end" headers. For example, the text "Hello" becomes:

$86%A80

Traditional vs Simplified Format

Traditional format: Includes headers and footers

begin 644 filename.txt
$86%A80
\`
end

Simplified format (this tool): Just the encoded data

$86%A80
  • First character: Indicates the number of bytes encoded in that line
  • Remaining characters: The actual encoded data using UU character set
  • Decoder compatibility: This tool can decode both traditional and simplified formats

Historical Use Cases

UUEncoding was essential in early computing environments:

  • Email Attachments: Before MIME, UUEncoding was used to send binary files via email
  • Usenet Newsgroups: Distributing software and files through text-only newsgroup systems
  • UUCP Networks: File transfer between Unix systems over dial-up connections
  • Legacy Systems: Maintaining compatibility with older Unix and mainframe systems
  • Archive Distribution: Sharing software before widespread internet adoption

UUEncoding vs Base64

While both are binary-to-text encodings, they have key differences:

  • Character Set: UUEncoding uses ASCII 32-95, Base64 uses A-Z, a-z, 0-9, +, /
  • Structure: UUEncoding has line length markers and begin/end headers
  • Usage: Base64 is modern standard, UUEncoding is legacy
  • Efficiency: Base64 is slightly more compact
  • Standards: Base64 has formal RFC specification, UUEncoding varies

How to Use This Tool

  1. Select "Encode" to convert text to UUEncoded format, or "Decode" to convert UUEncoded data back to text
  2. For encoding: Enter plain text in the input field - output will be in simplified format (just the encoded data)
  3. For decoding: Paste UUEncoded data - works with both traditional format (with begin/end lines) and simplified format (just encoded data)
  4. The result appears automatically in the output field
  5. Use the swap button to switch input and output
  6. Click the copy icon to copy the result to clipboard
  7. Error messages will appear for invalid UUEncoded data or formatting issues

Note: UUEncoding is primarily of historical interest. For modern applications, Base64 is recommended as it's more standardized and widely supported.