AZ Tools

Ascii85 / Base85 Encoder & Decoder

Developer

Ascii85 (also called Base85) packs four bytes into five printable ASCII characters, making it about 7% more compact than Base64 while staying text-safe. It's the binary-to-text encoding used inside PDF streams (ASCII85Decode filter) and PostScript, and a handy way to embed small binaries in source or config. This tool encodes UTF-8 text or raw hex bytes to Ascii85 and decodes it back. The Adobe/PDF variant wraps output in <~ … ~> delimiters and compresses an all-zero four-byte group to a single 'z'; the plain variant emits just the character stream. Decoding is lenient — it accepts the z shortcut and the optional delimiters either way — and validates each group, rejecting truncated single-character tails and groups that overflow 32 bits. Everything runs locally; nothing is uploaded.

Output

Adobe/PDF adds <~ ~> and the z zero shortcut. Decoding accepts both variants. Charset is ! to u (plus z).

How to use

  1. Pick Encode or Decode.
  2. Choose the Adobe/PDF or plain variant, and whether your data is UTF-8 text or hex bytes.
  3. Type or paste into the input box and copy the result.

Frequently asked questions

How is Ascii85 different from Base64?
Both turn bytes into printable ASCII, but Ascii85 uses 85 characters to encode 4 bytes as 5 characters (a 25% size increase) versus Base64's 64 characters encoding 3 bytes as 4 (a 33% increase). So Ascii85 output is a bit smaller, at the cost of using more punctuation characters that may need escaping in some contexts.
What does the 'z' do?
In the Adobe variant, a four-byte group that is all zeros is written as a single 'z' instead of '!!!!!', which saves space in data with runs of zeros. It's only valid between groups, never inside one. The plain variant never emits 'z'. This tool's decoder always understands 'z' regardless of variant.
What are the <~ and ~> markers?
They're the Adobe Ascii85 delimiters that mark the start and end of the encoded block (PDF uses ~> as the end-of-data marker). The Adobe variant adds them on encode; the decoder strips them automatically if present, so you can paste PDF/PostScript Ascii85 directly.
Why did decoding fail?
Ascii85 only uses the characters '!' (0x21) through 'u' (0x75), plus 'z'. A character outside that range, a final group with just one character (which can't represent any whole byte), or a five-character group whose value exceeds 0xFFFFFFFF is invalid and reported as an error.

Related tools