---
title: "uuencode"
description: "Unix-to-Unix encoding with a begin line and length-led lines of 45 bytes. How Usenet mailed binaries"
canonical_url: "https://encodings.agntn.dev/encodings/uuencode"
---
# uuencode

> Unix-to-Unix encoding with a begin line and length-led lines of 45 bytes. How Usenet mailed binaries

<encoding-facts name="uuencode">



</encoding-facts>

Before MIME, this is how you mailed a binary. First a `begin` line with the mode and the file name. Then lines of up to 45 bytes. Each one starts with a character that says how many.

```ts
encode("uuencode", "Cat", { name: "cat.txt" });
// "begin 644 cat.txt\n#0V%T\n`\nend\n"
```

`#` means three bytes, `0V%T` are those three bytes. The lone backtick is an empty line, then `end`. Why a backtick for zero and not a space? So no mail server eats it as trailing whitespace. Smart, for 1980.

Decoding takes the text with or without the frame. A `begin-base64` file is base64 wearing a uuencode hat, and it's refused as such.


## Sitemap

See the full [sitemap](https://encodings.agntn.dev/sitemap.md) for all pages.
