Ascii85 (also written Base85 or a85) is the binary-to-text encoding used in PDF and PostScript streams. By mapping four bytes onto five printable characters it is noticeably denser than Base64, which makes embedded images and fonts smaller. This tool encodes UTF-8 text into Ascii85 and decodes it back, including the z shortcut and optional PDF framing, all in your browser.
How it works
Ascii85 works on four-byte groups using base 85 with an offset:
- Four bytes form a 32-bit number. That number is written as five base-85 digits, each offset by 33 so the characters fall in the printable range starting at
!. - A full group of four zero bytes is collapsed to the single character
zto save space. - A partial final group is padded with zero bytes to length four, encoded, then truncated so it emits exactly one more character than the number of real bytes.
Decoding reverses each step: every five characters rebuild a 32-bit value and therefore four bytes, z expands to four zero bytes, and a short final group is padded with the highest digit u before the surplus byte is dropped. Optional <~ and ~> delimiters are stripped automatically.
Tips and example
Encoding the four bytes of Man yields 9jqo^, the classic Ascii85 example. A run of zero bytes — common in binary headers — compresses dramatically thanks to the z shortcut. When you copy a stream out of a PDF it usually carries the <~ ... ~> framing; paste it as-is and the decoder will discard the delimiters. Note that Ascii85 is the Adobe variant; for the ZeroMQ-flavoured Base85 that is safe inside source-code strings, use the dedicated Z85 tool instead.