How to use the XXencode tool
- Set Direction to Encode or Decode.
- To encode, paste text into Input and set File name in the begin line (default
message.txt). - To decode, paste the whole block from
begintoend. - Copy the result. Bytes that are not valid UTF-8 text are shown as hex.
What it does and when to use it
XXencode was a fix for a practical problem in the 1980s and 1990s: files sent by email were damaged when they passed through gateways that rewrote certain punctuation. By limiting itself to letters, digits, + and -, XXencode avoided the characters most likely to be changed.
Today you mostly meet it in archives of old Usenet posts and mailing lists, in retro computing, and in tests for decoders that support several legacy formats. Use this tool to read such a block or to produce one for testing.
It is the sibling of uuencode, which uses the same structure. For new work, Base64 is the standard choice; its alphabet is very close to XXencode’s, with + and / instead of + and -, in a different order. If you only need a compact, letters-and-digits form, see Base62.
How it works
- Text becomes UTF-8 bytes, split into lines of at most 45 bytes.
- Each line starts with a character for its byte count, looked up in the table
+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz. 45 bytes givesh; 3 bytes gives1. - Every 3 bytes become four 6-bit values, each written with the same table. A short final group is filled with zero bytes.
- A line containing only
+(zero bytes) is written, thenend.
The decoder finds the begin line, reads each line’s byte count, converts the characters back and drops the filler bytes. Everything runs in your browser.
Worked examples
Cat (Encode)
begin 644 message.txt
1Eq3o
+
end
“Cat” is 3 bytes, so the line starts with 1, the table entry for 3, followed by four data characters. Compare uuencode, which writes the same bytes as #0V%T.
Hello, world! (Encode, file name hi.txt)
begin 644 hi.txt
BG4JgP4wg65RjQalY6E++
+
end
B is the table entry for 13, the number of bytes. The two + signs at the end of the data line encode zero filler bits, because 13 bytes do not divide evenly into groups of 3.
Limits and tips
- The tool works with text you paste and shows results on screen; it does not open or save files.
- The permission field is always written as 644. The file name only labels the block; it does not affect the data.
- A line starting with a character outside the table, or worth more than 45, is reported with its line number.
Frequently asked questions
Why was XXencode created?
How is XXencode different from uuencode?
Can I decode a uuencoded block here?
What does the + line at the end mean?
Is XXencoded text secret?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.