yEnc Decoder
Paste a yEnc-encoded string to decode it.
Result
How it is calculated
When the text has a =ybegin header, the decoder takes only the lines between it and the =yend trailer as data, as the yEnc draft 1.3 asks (“yDecoder implementations must ignore any text outside the header/trailer blocks”); a =ypart line is metadata. Without a header the whole text is decoded as a bare fragment. The data lines are joined, 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 and checks integrity as the draft says: the size in the header, the size in the trailer and the decoded size must agree (for one part of a multi-part post, the trailer size, the =ypart begin–end range and the decoded size), otherwise it warns that the attachment is corrupt; when the trailer gives crc32 (or pcrc32 for a part), it compares the CRC32 of the decoded bytes with it. It does not read the filename.
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.
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 a line that begins exactly with “=ybegin ” starts a block, so “ =ybegin” with a leading space is not seen as a header, and the whole text is decoded as a bare fragment with 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. A bare fragment with no header has no size or CRC32 to check, so corruption in it goes unnoticed.
Sources
- yEncode - A quick and dirty encoding for binaries (draft v1.3, 5 Mar 2002) — Juergen Helbing, yenc.org (archived copy, Internet Archive)
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, and follows the yEnc draft 1.3 for the =ybegin/=ypart/=yend lines that a full Usenet binary post uses: it decodes only the data between the header and the trailer, ignores text outside them, and checks the sizes and the CRC32 checksum they give, warning when they do not match; it does not read the filename. 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.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm's Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments