yEnc Decoder

Paste a yEnc-encoded string to decode it.

Result

HELLO
5 bytes
Decoded as text (simplified yEnc: =ybegin/=ypart/=yend lines skipped, CRC not checked).

How it is calculated

The decoder first drops any line that starts with =ybegin, =ypart or =yend (they are metadata), then joins the remaining lines, because line breaks are not data. It reads the text one character at a time. A normal character with code c becomes the byte (c − 42) mod 256. The escape character = takes the next character with code c and turns it into (c − 64 − 42) mod 256; this is how bytes that would be troublesome in text (such as NUL, LF, CR and = itself) are carried. A lone = at the very end is ignored. If the resulting bytes are valid printable text, it shows that text; if they contain control characters or invalid UTF-8, it shows the bytes as space-separated hex pairs instead. The tool also reports the byte count. It only skips the header lines: it does not read the filename or part range and does not check the size or CRC.

Worked example

Paste the encoded text rovvy. Each letter has its code lowered by 42: r (114) gives 72, o (111) gives 69, v (118) gives 76 twice, and y (121) gives 79. The byte values 72, 69, 76, 76, 79 are the letters H, E, L, L, O. They contain no control characters, so the tool shows them as text: HELLO, with a count of 5 bytes. Data from a real file usually contains control or non-text bytes, so it will normally be shown as hex.

Try this example →

Common mistakes

  • Expecting a downloadable file. The tool is for a short fragment that you read as text or hex; a binary file such as an image comes out as a hex list, not as a file.
  • Putting a space or other character before the header word. Only lines that begin exactly with =ybegin, =ypart or =yend are skipped, so " =ybegin" with a leading space is decoded as data and adds meaningless bytes.
  • Using text that was copied through a program that changed the characters, for instance a mail client replacing non-ASCII bytes or trimming spaces. A single changed or missing character shifts or corrupts the output.
  • Dropping the = escape in front of a character. A lone = consumes the next character, so deleting or adding one shifts the meaning of the character after it.
  • Confusing yEnc with Base64. They are different formats; Base64 text will decode into unrelated bytes here, though the tool will not warn you. Also, since the CRC is not checked, a corrupted fragment is decoded without any error message.

About this calculator

yEnc is a binary-to-text encoding scheme designed specifically to post binary files (images, video, archives) to Usenet more efficiently than older methods. Where Base64 or uuencode inflate a file’s size by roughly 33-40% because they map raw bytes into a restricted printable-ASCII alphabet, yEnc instead shifts each byte’s value by 42 (mod 256) so that most bytes land directly in the printable range, escaping only the handful of bytes (like NUL, LF, CR, and the “=” escape character itself) that would otherwise break line-based text transport — keeping overhead down to roughly 1-2%.

This decoder handles that core “=” escape mechanism, converting a yEnc-encoded string back into text or hex, though it’s simplified: it skips the =ybegin/=ypart/=yend header lines that a full Usenet binary post uses to specify filename, part number, and CRC checksum, without reading or checking them. It’s a useful tool for anyone building or debugging Usenet newsreader software, or decoding a yEnc-encoded fragment by hand.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators