Skip to content
BetterPass logo

ASCII85 / Base85 Encode & Decode — Adobe, Z85, RFC 1924 & btoa

Encode or decode across four Base85 variants — Adobe Ascii85 (PDF/PostScript), Z85 (ZeroMQ), RFC 1924 (IPv6) and btoa (Base64 for comparison) — with Base85's ~25% size advantage over Base64, file upload, and live size stats.

Result

What is ASCII85 / Base85 Encoder & Decoder?

ASCII85 (also known as Base85) is a binary-to-text encoding that represents 4 bytes as 5 printable characters — the most space-efficient common text encoding.

~25% overhead — versus Base64's ~33% and Hex's 100%, so it is the densest widely used option.
Four variants in one — Adobe Ascii85 (PDF/PostScript), Z85 (ZeroMQ), RFC 1924 (IPv6), and btoa (Base64) for a direct size comparison.
z zero-compression (Adobe) — the z character stands for four zero bytes, shrinking sparse data further.
Switchable — encode and decode with the same variant on both ends, or compare sizes across variants.

Zero-Server Tool Data Guarantee

All encoding, decoding, and size math run locally in your browser. Your text and files never leave your device — no server upload, no logging, no tracking.

How to Use

01

Pick a Variant

Choose Adobe Ascii85, Z85, RFC 1924, or btoa (Base64). The size stats show how much space each encoding uses.

02

Select Encode or Decode

Encode turns text or a file into the chosen variant; Decode turns it back into readable text.

03

Enter Input or Drop a File

Type, paste, or drop a text file. The output updates in real time.

04

Toggle Adobe Markers (optional)

For Adobe, enable '<~ ~>' delimiters to match what PDF and PostScript parsers expect.

05

Copy

Use the copy button to grab the encoded or decoded result.

Common Use Cases

PDF Binary Content

Encode images and fonts for embedding in PDF and PostScript using the Adobe variant.

ZeroMQ Message Payloads

Represent binary frames as Z85 text in ZMQ applications and Go services.

IPv6 Address Text

Express IPv6 addresses compactly with the RFC 1924 character set.

Size Comparison

Compare Base85's ~25% overhead against Base64's ~33% for the same input.

Compact Data Transfer

Squeeze binary into the smallest text form when bandwidth or storage matters.

Implementation Examples

JavaScriptAdobe Ascii85 (native, no library)
// Adobe Ascii85: 4 bytes -> 5 chars (~25% overhead); 'z' = 4 zero bytes
function adobeEncode(bytes) {
const out = [];
for (let i = 0; i < bytes.length; i += 4) {
const chunk = bytes.slice(i, i + 4);
let num = 0;
for (let j = 0; j < 4; j++) num = (num * 256 + (chunk[j] || 0)) >>> 0;
if (chunk.length === 4 && num === 0) { out.push('z'); continue; }
const digits = [];
for (let k = 0; k < 5; k++) { digits.unshift(num % 85); num = Math.floor(num / 85); }
for (let k = 0; k < chunk.length + 1; k++) out.push(String.fromCharCode(digits[k] + 33));
}
return '<~' + out.join('') + '~>';
}
console.log(adobeEncode(new TextEncoder().encode('hello world')));
// "<~BOu!rD]j7BEbo7~>"

Base85 variants vs Base64

EncodingAlphabetOverheadPrimary Use
Adobe Ascii85! to u + z~25%PDF, PostScript
Z850-9 a-z A-Z + 23 symbols~25%ZeroMQ, Go
RFC 19240-9 A-Z a-z + 23 symbols~25%IPv6 addresses
btoa (Base64)A-Z a-z 0-9 + /~33%Web, email, APIs

Production Best Practices & Security

Use Adobe for PDF and PostScript — it is the native ASCII85 filter in these formats. Why:PDF viewers and PostScript interpreters expect the Adobe alphabet, the <~ ~> delimiters, and the z shortcut; other variants are not understood by them.
Use Z85 in Go and ZeroMQ apps — Z85 was designed to avoid characters that break JSON, URLs, and shells. Why:Its alphabet excludes ' and " and most unsafe punctuation, so Z85 strings fit cleanly into config files, JSON fields, and source code without escaping.
Use RFC 1924 for IPv6 address text — it was specified for compact IPv6 representation. Why:It treats the input as one big integer, so it is only truly lossless when leading zero bytes are absent; text and typical data round-trip cleanly.
Match the variant on both ends — the four variants use different alphabets. Why:Encoding with Adobe and decoding as Z85 produces completely wrong bytes; pick one variant and use it everywhere.
Prefer Base64 for broad compatibility — Base64 is built into every language and web platform. Why:ASCII85 needs a library in most languages and its punctuation must be escaped in strings; Base64 wins when interop matters more than the ~6% size saving.

Frequently Asked Questions

ASCII85 (also called Base85) is a binary-to-text encoding that turns 4 bytes into 5 printable characters. Because five base-85 digits can represent every 32-bit value, it only adds about 25% overhead for full blocks — the most space-efficient of the common text encodings.

By contrast, Base64 adds ~33% and hex doubles the size. The trade-off is that ASCII85 needs an 85-character alphabet and, depending on the variant, punctuation that may need escaping in source code.