What Ascii85 means on this page
Base85 is a family of encodings that represents four input bytes with five printable characters. This page implements the Ascii85 form associated with Adobe PostScript and PDF conventions. Its regular digits are the consecutive ASCII characters from ! through u. Because 85 to the fifth power is slightly larger than 2 to the thirty-second power, five such digits can carry one unsigned 32-bit group.
Adobe-style Ascii85 may wrap a complete value between <~ and ~>. It may also replace an entire four-byte zero group with the single character z. Those features are not universal across every Base85 variant, so the page exposes them explicitly. Encoding can add delimiters and use z; decoding accepts wrapped or unwrapped values, ignores defined ASCII whitespace, and validates that z appears only where a new five-character group could begin.
The last group needs special handling. If one, two, or three input bytes remain, the encoder pads a temporary 32-bit block with zero bytes, computes five characters, and emits only two, three, or four of them. The decoder pads a final group of two to four characters with u and removes the extra bytes. A one-character final group cannot carry even one byte and is rejected.
How to use the Ascii85 converter
- Choose Encode for normal text or Decode for an existing Ascii85 value.
- When encoding, enable Adobe delimiters if the target format expects <~ and ~>. Disable them for a raw Ascii85 field.
- Leave z shorthand enabled for compact Adobe-compatible output, or disable it when a consumer requires every zero block to be expanded to five characters.
- Paste encoded input with ordinary ASCII whitespace if necessary. The decoder ignores spaces, tabs, carriage returns, line feeds, and form feeds but validates all other characters.
- Use a round trip and the published Hello vector to verify that another implementation agrees about delimiters, partial groups, and shorthand.
Ascii85 and Adobe boundary examples
Ascii85 has more syntax than Base32 or Base64. These examples show plain output, Adobe delimiters, partial groups, ignored ASCII whitespace, and the special z token.
| Input | Output | Conversion direction | Notes |
|---|---|---|---|
Hello, world! |
<~87cURD_*#TDfTZ)+T~> |
Encode | Adobe delimiters: Adobe wrapped; z shorthand: Use z shorthand — Adobe Hello vector. Four-byte groups become five Ascii85 characters, and the final one-byte tail becomes two characters. |
hello |
BOu!rDZ |
Encode | Adobe delimiters: Plain Ascii85; z shorthand: Use z shorthand — Plain Ascii85. The same algorithm can be emitted without Adobe’s outer delimiters. |
<~ 87cUR
D_*#T DfTZ)+T ~> |
Hello, world! |
Decode | Decode with whitespace. ASCII spaces, tabs, and line breaks are ignored during decoding. |
z |
|