btoa Ascii85 encoder
Encode text in the original btoa dialect of Ascii85, with xbtoa Begin and End lines, z for four zero bytes and y for four spaces: Hello, world! becomes 87cURD_*#TDfTZ)+TMKB between the tags. Decoding checks the classic checksums. 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!
- Calculation mode
- Encode
- Variant
- btoa
- Bytes
- 13
The original btoa utility encoded binary files as printable Ascii85 long before Adobe popularized a related alphabet in PDF and PostScript. People still search for a btoa Ascii85 encoder when they need the classic xbtoa Begin and xbtoa End framing, the single-character z shorthand for four zero bytes, and the y space-compression tag for four ASCII spaces—features that Adobe-style tools often omit or implement differently. Encoding always emits full five-character groups with zero padding on the final incomplete block, records the true byte length on the End line, and wraps lines near seventy-eight characters so mail-era pastes still round-trip. Decoding accepts framed archives and verifies the classic file checksums, while still allowing unframed alphabet bodies for quick checks.
Encode UTF-8 text to original btoa Ascii85 with x tags
The engine interprets the string as Unicode text, serializes it to UTF-8 bytes, then groups those bytes four at a time into a big-endian thirty-two-bit value. Each full group becomes five characters from the classic alphabet that runs from exclamation mark through lowercase u. When a group is all zeros, a single z is emitted instead of five exclamation marks.
When a group is four ASCII space bytes, a single y is emitted—the space compression that Version 4.2 of the Unix tool introduced and that many Adobe-only decoders reject. Incomplete final groups are zero-padded for arithmetic so the encoder always writes complete five-character groups; the true byte length is written on the xbtoa End line so the decoder can drop pad bytes exactly.
Output is framed with the distinctive x tags: a first line xbtoa Begin, the encoded body wrapped near seventy-eight characters per line, and a final line xbtoa End N with the length in decimal and hexadecimal plus the three classic checksums E, S, and R. Empty strings are valid and produce a framed archive with N equal to zero. Multilingual text and emoji round-trip because the path is full UTF-8.
The response includes result with the framed archive, mode encode, variant btoa, bytes equal to the UTF-8 length, and framed true. Identical inputs always produce identical outputs because the algorithm is pure arithmetic with no network, salt, or clock.
Decode btoa Ascii85 and reject malformed or invalid input
Set mode to decode and put a btoa Ascii85 string in text. When the paste includes xbtoa Begin and xbtoa End lines, the engine strips that framing, parses N and the E, S, and R checksum fields, and decodes only the body between the tags. Whitespace and line breaks inside the body are ignored so multi-line mail archives still work.
The alphabet is strict: only characters from exclamation mark through lowercase u, plus standalone z for four zeros and y for four spaces, are accepted. Incomplete final groups shorter than five alphabet characters when not z or y are rejected. Begin without End, End without Begin, or a decimal and hexadecimal N that disagree are also treated as malformed.
Unframed alphabet-only bodies are accepted for convenience, but without N the decoder keeps every decoded byte including any zero pads the encoder would have recorded on the End line. Successful decode returns result as the recovered string, mode decode, variant btoa, bytes as the plaintext length, and framed true or false.
How it differs from other Ascii85 tools
Call the free in-browser btoa Ascii85 encoder for archaeology of Usenet-era archives, migration of old mail attachments, classroom demos of binary-to-text history, and one-off conversions without installing a vintage Unix binary. Another workflow pins both encode and decode goldens so continuous integration fails if z, y, framing, or checksum rules ever drift. Prefer this landing when the search intent is explicitly btoa Ascii85, xbtoa Begin, or original btoa with space compression.
Prefer a standard Base64 tool when someone means the browser JavaScript btoa function, which is an entirely different algorithm that happens to share a historical name. Authors shipping SDKs can map the result field into a copy button while variant btoa and framed labels keep OpenAPI examples self-explanatory for readers who only know the x-tag dialect.
What you can do with it
CI goldens for the btoa dialect
Pin encode and decode examples so continuous-integration tests fail if framing, checksums, or y/z compression rules ever change unexpectedly.
FAQ
How do I encode text to original btoa Ascii85?
The result field is a framed archive starting with xbtoa Begin and ending with xbtoa End plus length and E/S/R checksums.
How do I decode a btoa Ascii85 archive?
Set mode to decode and put the framed or unframed btoa string in text. When framing is present, N and the E/S/R checksums are verified before result returns the recovered UTF-8 text.
What are the z and y tags?
z compresses four zero bytes into one character. y compresses four ASCII space bytes (0x20) into one character. Both are part of the original btoa dialect this tool implements.
Is this the same as JavaScript btoa or Adobe Ascii85?
No. Browser btoa is Base64. Adobe Ascii85 uses optional <~ ~> delimiters, partial final groups, and typically no y space tag. This tool is the Unix btoa Ascii85 dialect with xbtoa x tags.
Is the btoa Ascii85 encoder free?
The browser tool runs free on your device.
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/ascii85-btoa \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Hello, world!"}'const res = await fetch("https://api.kit.forhosting.com/enc/ascii85-btoa", {
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/ascii85-btoa",
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/ascii85-btoa", 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/ascii85-btoa", 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.ascii85_btoa",
"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 capability focuses on that historical dialect only: choose mode encode or decode, send a text field, and receive a framed archive or recovered UTF-8 string, or a clear invalid_input error when the alphabet, framing, length, or E/S/R checksums do not validate.
Encode UTF-8 text to original btoa Ascii85 with x tags
Send a JSON body with the required string field text set to the plain message you want represented in the original btoa dialect, and leave mode at its default encode or set mode to encode explicitly. Optional aliases input, value, and s are accepted for the same field.
Decode btoa Ascii85 and reject malformed or invalid input
Any other character—including letters after u, URL punctuation borrowed from other encodings, or binary noise—causes an immediate invalid_input failure with a message that names the invalid btoa Ascii85 condition. After decoding full groups, the engine truncates to N bytes when framing is present, then recomputes the classic Ceor, Csum, and Crot checksums over the binary groups including pad slots; a mismatch on E, S, or R fails with invalid_input instead of returning silently corrupted data. After validation, recovered bytes are interpreted as UTF-8 with a fatal decoder so non-text payloads do not become replacement characters. Validation failures are not charged on the prepaid API.
API usage, pricing, workflows, and how this differs from Adobe and JS btoa
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. Prefer the separate Adobe Ascii85 Base85 tool when the payload uses less-than-tilde and tilde-greater-than delimiters or PDF-style partial final groups without y.
Integration use cases
Legacy Usenet and mail btoa archives
Decode or re-encode classic xbtoa Begin/End archives that use z zero runs and y space compression when migrating old attachments or verifying historical fixtures.
Teaching binary-to-text history
Show students how original btoa differs from Adobe Ascii85 and from JavaScript Base64 btoa using the same mode field and clear invalid_input errors.