How to use the uuencode decoder
- Paste your plain text or uuencoded data into the Input text field.
- Select Encode to convert text to the UU format, or Decode to reverse it.
- If encoding, optionally change the Filename used in the header line.
- The result appears automatically below as you type or change options.
How the algorithm works
The uuencode algorithm converts binary or text data into printable ASCII characters so it can travel safely through systems that only support basic text. It processes data in chunks of three bytes (24 bits). Each chunk is split into four 6-bit groups. Every 6-bit value (ranging from 0 to 63) is then shifted by adding 32, mapping it to an ASCII character between space (32) and underscore (95). Modern encoders, including this one, write a backtick instead of a space for the value 0, because spaces are easily lost in transit; decoders accept both. Modern encoders, including this one, write a backtick instead of a space for the value 0, because spaces are easily lost in transit; decoders accept both.
A length character starts each encoded line, indicating how many original bytes are represented on that line. For example, the word Cat is three bytes. The length character is 3 + 32 = 35, which is # in ASCII. The three bytes (67, 97, 116) become the 6-bit values 16, 54, 5, 52, which shift to 48, 86, 37, 84, producing the characters 0, V, %, T. The full encoded line is therefore #0V%T.
The file format structure
A standard uuencoded file wraps the encoded lines with a header and a footer. The header always begins with begin, followed by the file permissions in octal (traditionally 644), and the filename. The footer consists of a single backtick character (`) on its own line to indicate zero length, followed by a line containing just end.
This structure allowed early email and Usenet systems to identify where the encoded payload started and stopped. When you use this tool to decode, it looks for the begin and end markers. If the begin line is missing, it still decodes any valid lines it finds.
What it does not do: it encodes text as UTF-8 and always writes mode 644, it handles one file at a time, and it does not read or write binary files. When decoded bytes are not valid UTF-8 text, they are shown as hex instead.
Common uses for uu encoding
Before MIME and Base64 became the standard for email attachments, uu encoding was the primary way to send binary files like images, archives, and executables through text-only channels. Users would run the command in Unix, paste the output into an email, and the recipient would run uudecode to reconstruct the file.
Today, this format is largely historical, but it still appears in legacy systems, older Usenet archives, and certain niche data transfer protocols. Developers maintaining old codebases or parsing historical data dumps frequently need a reliable decoder. For modern applications, Base64 or ASCII85 are generally preferred due to better standardization and wider support.
Comparison with Base64
Both methods translate binary data into ASCII text, but they use different character sets and framing. The classic Unix method maps 6-bit values to ASCII codes 32 through 95, meaning the output includes spaces, punctuation, and letters. Base64 maps the same 6-bit values to a specific alphabet of uppercase letters, lowercase letters, digits, plus, and slash.
| Feature | Classic UU | Base64 |
|---|---|---|
| Character set | ASCII 32 to 95 | A-Z, a-z, 0-9, +, / |
| Padding | Backtick for empty line | Equals sign (=) |
| Header/Footer | begin / end lines | None (raw stream) |
| Modern usage | Legacy systems | Email, APIs, web |
Because Base64 avoids characters that might be altered by older mail transport agents (like spaces), it replaced the older format in almost all modern internet standards.
Edge cases and decoding errors
When decoding, several issues can cause failures. Lines must have the correct number of characters based on their length prefix. If a line has been truncated or wrapped incorrectly by an email client, the decoder may produce garbled output or throw an error. Trailing spaces are a classic hazard because some systems strip them. This decoder pads a short line back out with zero values, so stripped spaces are recovered, but a line that was truncated in the middle will decode to wrong bytes.
Another common mistake is mixing up this format with Quoted-Printable or hex encoding. Quoted-Printable uses equals signs followed by hex digits, while the classic Unix method relies on shifted 6-bit groups. If your input contains =20 instead of shifted characters, you are likely looking at Quoted-Printable data.
Worked examples
| Example | Input | Result |
|---|---|---|
| Encode "Hello" | Input text: Hello; Mode: encode; Filename (for header): hello.txt | begin 644 hello.txt / %2&5L;&\` / ` / end |
| Decode a UU string | Input text: begin 644 test.txt / %2&5L;&\` / ` / end; Mode: decode; Filename (for header): test.txt | Hello |
| Encode a longer sentence | Input text: The quick brown fox jumps over the lazy dog.; Mode: encode; Filename (for header): fox.txt | begin 644 fox.txt / L5&AE('%U:6-K(&)R;W=N(&9O>"!J=6UP<R!O=F5R('1H92!L87IY(&1O9RX` / ` / end |
FAQ
What is uuencode?
It is a method of converting binary or text data into printable ASCII characters. It was originally created to send files over Unix-to-Unix networks that only supported text transmission.
How do I decode a uuencoded string?
Paste the text into the input field above and select Decode. The tool will parse the begin and end markers, process the 6-bit character groups, and return the original text, or the raw bytes in hex if they are not valid UTF-8.
Is this the same as Base64?
No. Both encode binary data as text using 6-bit groups, but they use different character alphabets and formatting rules. Base64 is the modern standard, while the classic format is mostly found in legacy systems.
Why does my decoded output look wrong?
This usually happens if trailing spaces were stripped from the encoded lines during transit, or if the text was corrupted by an email client. Ensure the block is copied exactly as provided.
What does the number 644 mean in the header?
It represents Unix file permissions in octal notation. 644 means the owner can read and write the file, while everyone else can only read it.
Does this tool upload my data?
No. All encoding and decoding happens locally in your browser. Your text never leaves your device.