Base85 Encoder and Decoder
Base85 squeezes four bytes into five ASCII characters, denser than Base64’s 3-for-4 ratio, by using an 85-character alphabet instead of 64. This tool implements Adobe’s Ascii85 variant, the one shipped inside PostScript and PDF files. The encoder always wraps its output in <~ and ~> delimiters, and the decoder accepts input with or without them.
How to convert Base85 (Ascii85)
-
1
Choose encode or decode
Encode turns raw bytes into Ascii85; decode turns an Ascii85 string back into bytes.
-
2
Paste your text
Paste the bytes to encode or the Ascii85 string to decode into the input box.
-
3
The encoder chunks by 4 bytes
Every 4-byte block becomes a 5-character Base85 string. The final block is padded and truncated.
-
4
Copy the result
Ascii85 output is wrapped in `<~` and `~>` delimiters. Paste it back to decode it; the delimiters are stripped automatically.
Size overhead comparison
| Encoding | Chars per 4 bytes | Overhead vs binary |
|---|---|---|
| Hex | 8 | +100% |
| Base64 | 5.33 (rounded up to 8 with padding) | +37% |
| Base85 | 5 | +25% |
| Raw binary | 4 | 0 |
So 1 MB of binary becomes 1.25 MB in Base85, 1.33 MB in Base64, 2 MB in hex.
The Ascii85 alphabet
Ascii85 (Adobe): characters ! through u (33-117 in ASCII), plus z as a shortcut for 4 zero bytes. It is the standard encoding used in PostScript and PDF streams, wrapped as <~...~>.
Z85 (ZeroMQ) and the RFC 1924 IPv6 alphabet are different assignments of the same 85-character idea. This tool does not implement them, so strings encoded in those flavors would decode incorrectly here.
How the math works
Every 4 bytes are read as a big-endian 32-bit integer N. The 5 output characters are the digits of N in base 85, most significant first. 85^5 = 4 437 053 125 which is greater than 2^32, so 4 bytes always fit in 5 characters.
When Ascii85 matters
Open any PDF in a text editor and search for ASCII85Decode. Adobe uses it as a filter for embedded images and fonts that need to survive a 7-bit transport (old fax-style systems). The same encoding appears in many PostScript files and email-safe binary transports.
Special cases
- All-zero 4-byte block: Ascii85 encodes it as the single character
zinstead of!!!!!. - Last partial block: Padded with zero bytes, and the corresponding number of output characters is truncated at the end.
Frequently Asked Questions
Smaller output, yes. Universally compatible, no. Ascii85 contains characters like <, >, &, " that need escaping in XML, JSON and URLs. Most tooling speaks Base64 natively.
Inside PostScript and PDF streams, where the encoded region is marked with <~ and ~>. PDF viewers and editors handle this encoding automatically.
No. It implements Adobe Ascii85 only. Z85 (ZeroMQ) and the RFC 1924 IPv6 alphabet use different 85-character assignments, so a string encoded in those flavors would decode incorrectly here.
They mark the encoded region in the Ascii85 convention. The encoder always adds them, and the decoder strips them automatically when present. You can also paste a string without them.
Related Tools
A1Z26 Cipher Encoder
Encode text using the A1Z26 cipher (A=1, B=2, ... Z=26) or decode a number sequence back to letters, with customizable separator.
Base64 File Encoder
Encode any file (PDF, ZIP, image, executable) to Base64 text for embedding in JSON, email, YAML or data URIs. Runs locally, no upload.
AES Encrypt / Decrypt
Encrypt and decrypt low-risk text with AES OpenSSL ciphers. The passphrase is hashed with SHA-256 and the Base64 output is IV plus ciphertext.
Atbash Cipher Encoder
Encode or decode text with the Atbash cipher, a Hebrew substitution that maps A-Z to Z-A. Same operation encrypts and decrypts.
Caesar Cipher Encoder
Encrypt and decrypt text using the Caesar cipher. Any shift 1-25, supports ROT13 as a special case, preserves punctuation and case.
Base32 Encoder and Decoder
Encode and decode Base32 strings using the RFC 4648 alphabet. Useful for TOTP secrets, case-insensitive tokens and human-typed identifiers.
Tool available in other languages
- ตัวเข้ารหัสและถอดรหัส Base85 [TH]
- Base85エンコーダー・デコーダー [JA]
- Codificador y Decodificador Base85 [ES]
- Base85 Kodlayıcı ve Çözücü [TR]
- Base85 인코더 및 디코더 [KO]
- Base85 编码器和解码器 [ZH]
- Encodeur et décodeur Base85 [FR]
- Bộ mã hóa và giải mã Base85 [VI]
- Encoder dan Decoder Base85 [ID]
- Base85-kodare och avkodare [SV]
- Base85-Encoder/Decoder [DE]
- مشفر ومفكك Base85 [AR]
- Base85 encoder en decoder [NL]
- Koder i dekoder Base85 [PL]
- Codificador e Decodificador Base85 [PT]
- Codificatore e Decodificatore Base85 [IT]
- Кодировщик и декодировщик Base85 [RU]