ASCII85 (also called Adobe Base85) is a binary-to-text encoding used inside PostScript and PDF files to embed binary data such as images and fonts as printable ASCII. This tool encodes text into ASCII85 and decodes ASCII85 back to text, which is useful for developers inspecting or building PDF/PostScript streams.
How it works
ASCII85 takes four input bytes at a time, treats them as a single 32-bit number, and converts that number to base 85, producing five characters in the range ! (33) to u (117). This 4-to-5 expansion is more compact than Base64’s 3-to-4. Adobe’s variant adds two conventions:
- The full stream is wrapped in
<~at the start and~>at the end. - A group of four zero bytes is written as a single
zinstead of!!!!!.
A final partial group of n bytes encodes to n+1 characters. When decoding, the tool tolerates missing delimiters and ignores whitespace between characters.
Example
Encoding the text “Man ” (four bytes) gives the ASCII85 group 9jqo^, wrapped as:
<~9jqo^~>
| Format | ”Man ” encoded |
|---|---|
| Raw bytes | M a n (space) |
| ASCII85 | 9jqo^ |
| With delimiters | <~9jqo^~> |
ASCII85 encoding and decoding run entirely in your browser; your data stays on your device.