Tooleux

Ascii85 Encoder - Encode and Decode Base85 Online

Encode text to Ascii85 (Base85), or decode Ascii85 back to text.

Runs in your browser. Nothing leaves your device.
Encode text to Ascii85 (Base85) or decode Ascii85 back. Used in Adobe PDF and PostScript. Handles wrapper and z shortcut. Runs in your browser. Read more Show less

What is Ascii85?

Ascii85 (also called Base85) is a binary-to-text encoding that represents every 4 bytes of input as 5 printable ASCII characters. It is more compact than Base64: Base64 adds 33% overhead, Ascii85 adds 25%. It was designed for Adobe PostScript and is still used in PDF binary streams and Git binary patches.

The encoding uses characters from ! (33) through u (117), plus the special z shortcut for four consecutive null bytes. The name Ascii85 comes from 85 being the number of characters in the alphabet.

How to use

Choose a mode:

  • Encode - type or paste text. The UTF-8 bytes of the text are encoded as Ascii85.
  • Decode - paste Ascii85 output. The decoded UTF-8 text is shown.

Two optional behaviors:

  • Wrapper - surround the output with <~ and ~>, the delimiters used in PostScript and PDF. On decode the tool strips them automatically if present.
  • z shortcut - encode four consecutive null bytes as the single character z. This is standard behavior and saves space, but some decoders do not implement it. Turn it off for maximum compatibility.

Ascii85 vs Base64

Ascii85 is more compact (25% overhead vs 33%). Base64 is more widely supported and uses only safe ASCII characters (A-Z, a-z, 0-9, plus two symbols). Ascii85 uses the full printable range, which is not safe for URLs or JSON without escaping.

If you need URL-safe encoding, use Base64url. If you are working with PDF, PostScript, or Git binary patches, use Ascii85.

FAQ

Why does my decoded output look like garbage?

The decoded bytes are not valid UTF-8. Ascii85 is often used to encode binary data (image bytes, PDF streams, compressed content), which does not convert to text. When this happens the tool shows the bytes as hex so you can see what was decoded.

What does the z shortcut do?

Four consecutive null bytes are common in binary data. Ascii85 encodes them as a single z character instead of 5 characters, saving space. On decode, z expands back to four null bytes.

Is Ascii85 the same as Base85?

The names are often used interchangeably, but "Base85" sometimes refers to a different variant. Ascii85 specifically means the Adobe variant. Git uses its own Base85 variant with a different alphabet, which is not compatible with this tool.

Why does the output sometimes fail to decode?

Ascii85 requires that the input length, after removing whitespace and wrapper delimiters, be a valid encoding length. A group of 5 characters produces 4 bytes; the last group may be shorter, but only lengths 2, 3, 4, or 5 are valid. A single trailing character is never valid.

Is my data sent anywhere?

No. Encoding and decoding run entirely in your browser.

Command line equivalent
# Python (standard library)
python3 -c "import base64,sys; print(base64.a85encode(sys.stdin.read().encode()).decode())"

# Python (with wrapper)
python3 -c "import base64,sys; print(base64.a85encode(sys.stdin.read().encode(), adobe=True).decode())"

# Node (no built-in; use ascii85 package)
npm i ascii85
node -e "const a=require('ascii85'); console.log(a.encode(Buffer.from('Hello')))"

# PostScript / Ghostscript
echo "Hello" | gs -q -dNOPAUSE -dBATCH -sDEVICE=txtwrite -
Loads a test value into the form
Input
Output