UUEncode / UUDecode

Classic Unix-to-Unix email attachment encoding, in your browser

Ad placeholder (leaderboard)

UUEncode is the original Unix-to-Unix encoding that let people email or post binary files across systems that only passed 7-bit text. It predates MIME base64 and you still find uuencoded blocks in old archives and Usenet. This tool encodes text into a proper uuencoded block with header and trailer, and decodes such blocks back to the original bytes, all in your browser.

How it works

A uuencoded stream starts with a header line begin 644 filename, where 644 is the octal file mode and the name is preserved for the decoder. The body encodes the data in lines of up to 45 source bytes. For each group of three bytes (24 bits), uuencode produces four characters by chopping the 24 bits into four 6-bit values and adding 0x20 to each, mapping 0-63 onto printable ASCII. Every line begins with one more character that encodes the line’s source-byte count, so the decoder knows how many bytes to keep when the last group is padded.

The block ends with a line containing a single zero-length marker followed by end. To stay safe in email, a 6-bit value of zero is written as a backtick rather than a literal space; this tool emits and accepts that form.

Tips and notes

If you are decoding a real message, paste everything from the begin line through end. The tool ignores anything before begin, so surrounding email headers are harmless. For new work prefer MIME base64 or Quoted-Printable, but uuencode remains the right tool for recovering legacy payloads. The XXEncode variant solves the same problem with a punctuation-free alphabet that survives stricter gateways.

Ad placeholder (rectangle)