yEnc encoder and decoder
Encodes “Hello Usenet” into a framed yEnc fragment, with a =ybegin header and a =yend line carrying the checksum 38A1E859, and decodes such fragments back to text. Each byte is shifted by 42 instead of expanded, so overhead stays far below Base64. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Text
- Hello Usenet
- Calculation mode
- Encode
- Name
- hello.bin
- Encoding
- yenc
- Size
- 12
- Crc32
- 38A1E859
- Line
- 128
The engine is fully deterministic: the same text, mode, name, and line length always produce the same result, with no network calls, no random salts, and no date-dependent shortcuts. Common checks include encoding Hello Usenet into a framed article fragment and decoding that fragment back to the original phrase.
How yEnc keeps binary data small
Base64 turns every three bytes into four characters, so a file grows by about a third. yEnc takes a different route: each byte is shifted by 42 and written as a single character, and only four critical values, null, line feed, carriage return and the equals sign, get an equals sign and an extra 64. Soft line breaks keep article lines near the classic width of 128 characters. That is why yEnc became the usual way to carry binaries inside Usenet articles. Here your text is turned into UTF-8 bytes first, so accents and other scripts come back intact.
Reading the header and the checksum
An encoded fragment opens with a =ybegin line that states the size, the line length and a file name, and closes with a =yend line that repeats the size and often adds a CRC-32 checksum. “Hello Usenet” with the name hello.bin gives 12 bytes in, a framed result of 85 bytes and the checksum 38A1E859. Decoding accepts complete fragments as well as a bare body, which helps when a support ticket only holds a pasted excerpt. The same text, name and line length always give the same result.
yEnc in Usenet articles and support work
Frontend and support teams decode yEnc snippets during ticket investigation without pasting data into ad-hoc scripts that mishandle critical escapes or soft line wraps. Backend services encode short multilingual strings or configuration samples into framed yEnc for integration tests that must match a real poster’s offset and header layout. Quality engineers generate deterministic encode and decode pairs for contract tests so a library that claims yEnc support cannot silently change escape rules, CRC polynomials, or header attribute order without breaking goldens.
Pair it with Base64 and quoted-printable helpers when you need related transfer encodings, and with other text tools when you are building a small lab of free, deterministic encoders.
What you can do with it
Usenet article debugging
Encode or decode yEnc article fragments so =ybegin size, body escapes, and CRC-32 trailers match what newsreaders expect.
FAQ
What does the yEnc encoder cost?
It is free in your browser on this page.
How is yEnc different from Base64?
yEnc shifts each byte by 42 and only escapes a few critical values, so overhead is much lower than Base64’s four-character alphabet. It was designed for Usenet article bodies rather than email MIME.
What happens if an escape or CRC is malformed?
Incomplete '=' escapes, size mismatches, and CRC-32 mismatches are all rejected rather than guessed.
Is the result deterministic?
Yes. The same text, mode, name, and line length always produce the same result with no network, randomness, or date-dependent behavior.
Which bytes does yEnc escape?
Every byte is first shifted by 42. If the result is one of four critical values, null, line feed, carriage return or the equals sign, it is written as an equals sign followed by that value plus 64; everything else stays a single character.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/enc/yenc \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Hello Usenet"}'const res = await fetch("https://api.kit.forhosting.com/enc/yenc", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "Hello Usenet"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/yenc",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "Hello Usenet"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/yenc", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"Hello Usenet"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"Hello Usenet"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/yenc", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "Hello Usenet"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.yenc",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This yEnc encoder converts plain UTF-8 text into the low-overhead binary transfer format long used on Usenet, and decodes framed or raw yEnc payloads back to readable text. yEnc keeps almost every octet as a single printable or extended character after a fixed plus-forty-two offset, escaping only a tiny critical set so binary data rides NNTP article bodies with far less expansion than Base64. Use it free in the browser for Usenet tooling practice and article debugging, or call the API at $0.002 per successful request when pipelines need reproducible yEnc transforms in CI and backend services.
What yEnc is and what this tool returns
yEnc is a content-transfer style encoding designed so binary files can travel inside Usenet articles without the one-third size penalty of Base64. Each input byte is shifted by forty-two modulo two hundred fifty-six; only the critical values null, line feed, carriage return, and equals are escaped by prefixing an equals sign and adding sixty-four before emission. Encoders then insert soft line breaks so article lines stay near the classic one-hundred-twenty-eight character width, and they frame the body with a =ybegin line that carries size, optional line length, and a file name, plus a =yend trailer that often includes size and an IEEE CRC-32 checksum. This page always follows that contract for UTF-8 text: encode mode UTF-8 encodes your string, applies the offset and critical escapes, wraps lines, and emits headers with a computed CRC; decode mode strips control lines, ignores CR and LF in the body, reverses escapes, checks size and CRC when present, and rejects incomplete equals sequences instead of guessing. The JSON response includes result for the transformed string, mode echoing encode or decode, encoding fixed to yenc, size for the binary payload length, optional name and crc32, framed true when headers were used or detected, and input_bytes plus output_bytes so you can assert sizes in tests. There is no streaming path and no silent repair of broken yEnc: either the string is valid under these rules or the request fails with invalid_input. If you need opaque email-safe packing, prefer Base64 or quoted-printable endpoints; this landing is for the Usenet-oriented yEnc encoding that news clients and binary posters already expect.
How text, mode, name, and line are read and how results stay reproducible
Encode accepts any Unicode string, converts it with the platform TextEncoder to UTF-8 bytes, then emits a framed yEnc article fragment with uppercase CRC-32. After bytes are recovered, a fatal UTF-8 decode ensures binary garbage does not become mojibake text. The preferred payload field is text, with aliases input, value, and s so forms, query strings, and SDK clients can reuse the same contract without renaming columns. Mode defaults to encode and accepts decode explicitly; aliases op, direction, and action map to the same switch for scripts that already use those names. Optional name (aliases filename, file) is written on the =ybegin line when encoding and defaults to data.bin; it must not contain carriage returns, line feeds, or equals signs. Optional line (aliases line_length, linewidth) sets the body wrap width between thirty-two and five hundred twelve characters and defaults to one hundred twenty-eight, matching common yEnc practice. Decode accepts framed text with =ybegin and =yend or a raw body-only stream: a trailing incomplete equals escape, an equals followed by a line break, a size mismatch against the decoded byte count, or a CRC-32 mismatch all fail with a clear invalid_input message. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing yEnc tables yourself. Invalid inputs return invalid_input and are not charged, which keeps validation cheap while successful transforms remain a fixed item price.
Where yEnc fits in Usenet, binaries, and test fixtures
Educators use the same tool when teaching the difference between Base64 opacity and yEnc’s low-overhead Usenet encoding for mostly binary payloads. On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the encoded result.
Integration use cases
Binary fixture generation
Produce reproducible framed yEnc strings for unit tests, golden files, and NNTP or poster integration checks.
Parser and CRC validation
Decode suspect payloads to surface incomplete escapes, size mismatches, and CRC-32 errors without guessing.
Technical questions
What modes are supported?
mode=encode (default) turns plain text into framed yEnc with =ybegin and =yend. mode=decode turns a yEnc string (framed or raw body) back into UTF-8 text.