Upload a file
  1. base64hub
  2. Other bases
  3. Xxencode

Xxencode and Xxdecode Online Converter

Type text to get xxencoded output, the uuencode variant that uses only letters, digits, + and -. Flip the direction to xxdecode a block, with the file name taken from its begin line.

Free no sign-up, no limits Local nothing uploaded 64 safe chars + - 0-9 A-Z a-z Updated Oct 27, 2026
Input 0Bytes 0 BOutput 0

Processed in your browser. This page cannot send your data anywhere – how we know

How to xxencode and xxdecode

To encode:

  1. Type or paste text into Input · Text. The xxencoded block appears in Output · xxencode.
  2. Set the File name under the output to the name the recipient should get; the default is data.bin.
  3. Untick begin/end lines if you only want the data lines.

To decode:

  1. Click xxencode → Text in the direction toggle.
  2. Paste the block. Any text before the begin line, such as a mail header or a note, is skipped.
  3. Read the result, set To to Hex for binary content, or click Save bytes to download it under the name in the begin line.

Why xxencode exists

Uuencode’s alphabet is every character from space (or backtick) to _, which includes [, ], ^, \ and !. These caused trouble on mail gateways between ASCII and EBCDIC systems, IBM mainframes and the BITNET network among them, because those characters had no single EBCDIC equivalent. Files arrived with characters swapped and decoded into garbage.

Xxencode keeps the uuencode structure and swaps the alphabet for 64 characters that convert reliably: +, -, 0–9, A–Z and a–z. Value 0 is +, value 1 is -, digits start at value 2, and lower-case z is 63.

Uuencode and xxencode side by side

The same inputs in both formats, with the file name hello.txt:

InputUuencode data lineXxencode data line
Cat#0V%T1Eq3o
Hello, world,2&5L;&\L('=O<FQDAG4JgP4wg65RjQalY
4 zero bytes$````````2++++++++

The first character of each line is the byte count in the format’s own alphabet: 3 is # in uuencode and 1 in xxencode, 12 is , and A, 4 is $ and 2. A full 45-byte line starts with M in uuencode and h in xxencode.

A whole xxencoded file looks like this, here for The quick brown fox jumps over the lazy dog. 0123456789 saved as fox.txt:

begin 644 fox.txt
hJ4VZ653pOKBf647mPrRi64NjS0-eRKpkQm-jRaJm65FcNG-gMLdt64FjNmsU
8A12mAnEpBXQsCE++
+
end

The size is the same as uuencode: 4 characters per 3 bytes plus a length character and a newline per line, about 38% larger than the input.

Xxencode in Python

Python has no xxencode, but binascii.b2a_uu produces the same 6-bit values, so translating its output from the uuencode alphabet to the xxencode alphabet gives correct xxencoded lines, length character included:

import binascii

UU = "`" + "".join(chr(c) for c in range(33, 96))
XX = "+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
TO_XX = str.maketrans(UU, XX)

def xxencode_line(chunk: bytes) -> str:
    return binascii.b2a_uu(chunk, backtick=True).decode().translate(TO_XX)

xxencode_line(b"Cat")    # '1Eq3o\n'

Feed it 45 bytes at a time, then add begin 644 name at the top and + and end at the bottom. For decoding, translate with str.maketrans(XX, UU) and call binascii.a2b_uu on each line. See the Python page for more on bytes and encodings.

Common problems

  • Garbage output from a file you were told is xxencoded. Check the first character of the full lines. If it is M, the file is uuencoded; use the uuencode tool.
  • A line decodes to the wrong length. The length character was changed or lost, often by a mail client that re-wrapped lines. Xxencode cannot recover a line that was split or joined.
  • The decoded file is cut short. The block was posted in several parts. Join them in order, with one begin and one end, and decode the result.

FAQ

What is the difference between xxencode and uuencode?

Only the alphabet. Both write 3 bytes as 4 characters in lines of up to 45 bytes with a length character, framed by begin and end. Uuencode uses the ASCII range from backtick and ! to _; xxencode uses +, -, digits and letters.

How can I tell whether a file is xxencoded or uuencoded?

Look at the first character of the full data lines: M means uuencode and h means xxencode, since both stand for 45 bytes. Lines full of punctuation such as `, # or % are uuencode.

Which program decodes xxencoded files?

UUDeview handles both formats; on Debian and Ubuntu it is the uudeview package. The uudecode from GNU sharutils reads uuencode and Base64 but not xxencode.

Why does an xxencoded file end with a + line?

+ is the xxencode character for 0, so a line containing only + is a data line of length zero. It plays the same role as the lone backtick line in uuencode, just before end.