How to use the Uuencoded File Decoder tool
- Paste the uuencoded text into UUencoded data, including the begin line at the top and the end line at the bottom.
- Select Decode file. The Example button decodes a tiny file named hello.txt.
- Read the content in the Result box. Binary files are summarized as a byte count and a hex dump.
- Select Download to save the file under the name from the begin line, or Copy to copy the displayed text.
How uuencoding works
Uuencode, short for Unix-to-Unix encoding, was created to send binary files through mail and news systems that handled only 7-bit text. It takes three bytes at a time, splits their 24 bits into four 6-bit values and adds 32 to each, which gives printable characters from the space (32) to the underscore (95). Many encoders write zero as a backtick (96) in place of a space.
Each output line starts with one character that states how many bytes the line holds, followed by the data characters. A full line carries 45 bytes, so it starts with M and is 61 characters long. A header with the word begin, a Unix permission mode and a file name comes first. A zero-length line and the word end close the block.
A uuencoded file decoded by hand
In the data line below, the first character is the number sign, code 35, and 35 minus 32 is 3, so the line holds three bytes. The next four characters have the values 16, 54, 5 and 52. As 6-bit groups those are 010000 110110 000101 110100, or the bytes 43, 61 and 74 in hex: the word Cat.
begin 644 cat.txt
#0V%T
`
end
→ Cat (Download saves cat.txt)What this uuencoded file decoder requires
The tool decodes the classic uuencode layout and checks each line. The file name is reduced to its last path segment, so begin 644 /tmp/report.pdf downloads as report.pdf.
- A header made of the word begin, three octal digits and a file name. Text before it is skipped.
- A line containing only the word end after the data. Anything after it is ignored.
- Data characters from the space to the backtick. Both the space and the backtick are read as zero.
- One file per run. Of several pasted blocks, only the first is decoded.
Why a uuencoded block fails to decode
The most common problem is lost trailing whitespace. When an encoder uses spaces for zero values, a line can end in a space, and editors and mail clients often strip it. The line is then shorter than its length character says. The sample behind the Example button has such a space at the end of its data line.
- Include the begin and end lines: the header or the end line is missing, indented or capitalized, or the mode does not have exactly three digits.
- The file contains an invalid UUencoded character: a lowercase letter or another character outside the allowed range appears in a data line.
- A UUencoded line is incomplete: a line was cut short or lost its trailing spaces.
Frequently asked questions
What is a uuencoded file?
It is a file converted to printable ASCII so it can pass through text-only channels. The block starts with a begin line that names the file, continues with lines that usually start with M, and finishes with end.
Can this tool create uuencoded text?
No. It only decodes. On Unix-like systems the uuencode command produces the format. For example, uuencode report.pdf report.pdf prints the encoded block to standard output.
Why do most lines start with the letter M?
The first character of each line encodes the number of bytes on it. Full lines hold 45 bytes, and 45 plus 32 is 77, the code for M. Only the last data line is usually shorter.
Does it decode blocks that start with begin-base64?
No. That header marks the Base64 variant of the uuencode utility. This tool expects the traditional encoding and a header that starts with begin followed by a space.
Is my pasted data uploaded to decode it?
No. Decoding is done by JavaScript in the page and the download is generated from memory in your browser, so the content does not leave your computer.