Use Base85 Encoder/Decoder

Enter your data below to use the Base85 Encoder/Decoder

📌 Try these examples:
RESULT

Last updated

What Is Base85 Encoding?

Base85 (also called Ascii85) is a binary-to-text encoding that uses 85 printable ASCII characters to represent binary data. It encodes every 4 bytes of input into 5 ASCII characters, achieving roughly 25% overhead — significantly more efficient than Base64's 33% overhead. This makes it attractive for embedding binary data in text formats where size matters.

Adobe invented Ascii85 for PostScript and PDF files. The RFC 1924 variant uses a slightly different alphabet designed for IPv6 address compression. Git also uses a Base85 variant for binary patch files.

Base85 vs Base64 vs Base32

EncodingAlphabet sizeOverheadMain use
Base3232 chars~60%TOTP keys, DNS
Base6464 chars~33%Email, JWTs, web
Base8585 chars~25%PDF, PostScript, Git patches

How the Encoding Works

Base85 treats every 4 bytes as a 32-bit big-endian integer, then encodes it as 5 digits in base 85. The alphabet used by Ascii85 is ASCII characters 33–117 (! through u). A special case: if all 4 bytes are zero, the output is a single z character instead of !!!!!.

Text
Input bytes: 0x4D 0x61 0x6E 0x20  (= "Man ")
32-bit value: 0x4D616E20 = 1298230816

Divide repeatedly by 85:
1298230816 / 85 = 15273303 r 1  → char 1+33 = '"'
15273303   / 85 = 179685  r 48  → char 48+33 = 'Q'
179685     / 85 = 2114    r 55  → char 55+33 = 'X'
2114       / 85 = 24      r 74  → char 74+33 = 'k'
24         / 85 = 0       r 24  → char 24+33 = '9'

Output (reversed): 9Xk"Q  → but standard Ascii85 wraps in <~ ... ~>

Where You'll Find Base85

Python Example

Python
import base64

# Python's base64 module includes ascii85 support
data = b"Hello, World!"
encoded = base64.a85encode(data)
print(encoded)  # b'87cURD]i,"Ebo80'

decoded = base64.a85decode(encoded)
print(decoded)  # b'Hello, World!'

# For the b85 variant (used by Git/ZeroMQ):
encoded_b85 = base64.b85encode(data)
print(encoded_b85)  # b'NM&qnZ!92pZf0l9'

Frequently Asked Questions

Simply enter your data, click the process button, and get instant results. All processing happens in your browser for maximum privacy and security.