About the Base85 Encode
ASCII85, also called Base85, encodes four bytes as five printable characters, giving about 25 percent overhead versus Base64's 33 percent. It is the encoding Adobe uses inside PDF and PostScript files for embedded data, and Git uses a variant for binary diffs. This tool uses the Adobe convention, wrapping the output in <~ and ~> delimiters and using z as shorthand for four zero bytes.
Encoding works on four-byte groups. When the input length is not a multiple of four, the last group is padded with zero bytes, encoded, and then shortened by exactly the number of padding bytes added, which is why the tail of an ASCII85 string can be two, three or four characters rather than five. The z shorthand applies only to a complete group of four zero bytes and never inside that partial final group, a rule hand-written encoders frequently get wrong.
The price of the smaller size is a larger alphabet containing quotes, backslashes and angle brackets, so ASCII85 is not safe unescaped in URLs, filenames, XML or JSON string literals the way Base58 is. Treat it as a transport encoding for contexts that accept the full printable ASCII range. The Base85 Decode tool reverses it, and Base64 Encode is the safer pick when the receiving system only promises Base64 support.
How to use
- Paste the text.
- Copy the ASCII85 output, including the delimiters.
- Use it in a context that expects ASCII85.
Common questions
- What are the <~ and ~> markers?
- They are the Adobe ASCII85 delimiters marking the start and end of the data. The decoder accepts input with or without them.
- What does the z stand for?
- A group of four zero bytes, abbreviated to a single z as an optimisation.
- Is this the same as Z85?
- No. Z85 (used by ZeroMQ) has a URL-safe alphabet. This is Adobe ASCII85.