Uuencode encoder & decoder
Turns “Hello, world!” into a classic uuencode document headed begin 644 data.txt, and reads such documents back into text. Rows carry up to 45 bytes, accents and emoji survive the round trip, and broken headers are refused, never guessed. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Text
- Hello, world!
- Result
- begin 644 data.txt -2&5L;&\L('=O<FQD(0 end
- Calculation mode
- Encode
- Filename
- data.txt
- Filemode
- 644
Classic Unix uuencode turns arbitrary bytes into a mail-safe ASCII document with a begin header that carries a permission mode and filename, body lines that each start with a length-prefix character, and a terminating end line. People still meet this format in old mailing-list archives, firmware dumps, Usenet pastes, and legacy build scripts that shell out to uuencode or uudecode. This capability encodes plain UTF-8 text into a complete classic uuencode document, or decodes a full document back to text, while rejecting malformed headers, illegal length prefixes, and broken body alphabet with a clear invalid input error.
Encode text to classic Unix uuencode
The engine serializes the string as UTF-8 bytes, then emits a document that starts with begin, a three-or-four-digit octal permission such as 644, and a single-token filename such as data.txt. Empty strings are valid and produce a document with only the terminator between begin and end. Multilingual text and emoji round-trip because the path is full UTF-8, not a Latin-1 shortcut.
The response includes result with the full uuencode document, mode equal to encode, filename and filemode echoing the header values, and bytes equal to the UTF-8 length before encoding so tests can assert size. Identical inputs always produce identical outputs because the algorithm is pure arithmetic with no network, no random salt, and no wall clock.
Decode uuencode documents and handle malformed input
Set mode to decode and put a complete classic uuencode document in text, including the begin line, length-prefixed rows, zero-length terminator, and end footer. Leading noise lines before begin are skipped so mail pastes still work, carriage returns are normalized, and both space and backtick are accepted as the encoded zero character because historic tools disagree on trailing-space safety.
The engine parses the octal mode and filename from the begin header, walks each data line, validates that the length prefix does not exceed the classic forty-five-byte maximum, expands each quartet back to three bytes, and stops at the zero-length terminator before end. Successful decode returns result as the recovered string, mode decode, filename and filemode from the header, and bytes as the decoded UTF-8 length.
Prefer this capability when search intent is literally uuencode or uudecode for the classic begin-mode format; Base64, Base64url, and PEM wrappers are separate landings with different alphabets and headers.
Everyday uses and practical limits
Call the free in-browser uuencode encoder for classroom demos, support playbooks, and one-off conversions without installing GNU sharutils or language-specific uu modules. A typical workflow encodes a short shell snippet with filename set to install.sh and filemode 755, ships the document through a ticket system, then decodes it on the receiving service with mode decode and asserts that bytes and filename match. Another workflow verifies that a documentation sample still decodes to the documented plaintext before a release.
Authors shipping SDKs can map the result field straight into a copy button, while filename, filemode, and bytes labels make screenshots and OpenAPI examples self-explanatory for readers who only remember the classic begin 644 name pattern from old man pages.
FAQ
How do I uuencode text?
Optionally set filename and filemode for the begin header. The result field contains the full classic uuencode document.
How do I decode a uuencode document?
Send mode decode and put the full document (begin … end) in text. On success, result is the UTF-8 plaintext; filename and filemode come from the header.
Is the uuencode encoder free?
The browser tool runs free on your device.
What do the begin 644 and end lines mean?
The begin line carries the Unix permission mode, 644 unless you set another, and the file name, data.txt by default. After the last row comes an empty terminator line and then end, which tells classic uudecode tools the content is complete.
Why is my pasted uuencode text rejected?
Decoding stops when the begin or end line is missing, a row declares more than 45 bytes, a character falls outside the uuencode range, or a row is shorter than its length mark promises. Lines before begin, such as mail headers, are simply skipped.
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/uuencode \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Hello, world!"}'const res = await fetch("https://api.kit.forhosting.com/enc/uuencode", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "Hello, world!"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/uuencode",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "Hello, world!"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/uuencode", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"Hello, world!"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"Hello, world!"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/uuencode", 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, world!"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.uuencode",
"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
Encode text to classic Unix uuencode
Send a JSON body with the required string field text set to the plain message you want to wrap, leave mode at its default encode or set mode to encode explicitly, and optionally pass filename and filemode for the begin header. Each body line carries up to forty-five payload bytes: the first character is the length prefix, computed as ASCII value thirty-two plus the byte count, followed by groups of three bytes mapped into four printable characters in the historic six-bit-plus-thirty-two alphabet. A zero-length terminator line appears before the final end line so classic uudecode tools know the payload is complete. Optional aliases input, value, s, payload, and data are accepted for the text field when clients reuse older form names.
Decode uuencode documents and handle malformed input
Missing begin, missing end, a non-empty line after the terminator, illegal body characters outside the printable uuencode range, or a truncated body shorter than the length prefix requires all raise invalid_input with an explicit message instead of silent garbage. After the byte payload is recovered it is decoded as UTF-8 with a fatal decoder so corrupted binary that is not valid Unicode text also fails cleanly. Validation failures are not charged on the prepaid API, so probing a suspicious archive paste is cheap for operators and safe for end users.
API usage, pricing, workflows, and practical limits
Use the prepaid KIT API when a backend, serverless function, or SDK needs the same encode or decode step under balance at $0.002 per successful item; failed validation never consumes balance after the engine rejects the request. Pair this endpoint with Base64 or quoted-printable tools only when a pipeline must interoperate with multiple historic envelopes, but keep the steps separate so each landing page matches a single search intent.
Integration use cases
Legacy mail and Usenet pastes
Decode classic uuencode blocks recovered from mailing-list archives or Usenet dumps back to UTF-8 text, with clear invalid_input when a paste is truncated mid-line.
Docs and CI golden checks
Pin encode and decode fixtures that include begin headers and length-prefixed rows so continuous integration fails fast if the classic alphabet or terminator rules ever drift.
Support and education
Agents and students convert text to uuencode and back in the free browser widget, learning the historic mode and filename header without installing system uuencode binaries.
Technical questions
What does the length prefix on each row mean?
The first character of each data line encodes how many decoded bytes that line carries (ASCII value = 32 + length, with a zero-length terminator before end). Classic lines hold at most 45 bytes.
What happens if the uuencode input is malformed?
Decode fails with invalid_input when the begin/end framing, length prefix, body alphabet, or UTF-8 payload is illegal. The error message describes the problem; the request is not charged.