Skip to content
BCBinary Code Translator
Menu

Adobe-style Ascii85 tool

Base85 / Ascii85 Encoder and Decoder

Convert UTF-8 text with Adobe-style Ascii85, optionally wrap output in <~ ~>, use the z shorthand for zero groups, and strictly validate whitespace, groups, and delimiters.

Ascii85 conversion is performed locally; your text and encoded bytes never leave the page.

Conversion direction
0 characters
0 characters

Conversion runs locally in this browser. The input is not uploaded.

No result yet.

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

  1. Choose Encode for normal text or Decode for an existing Ascii85 value.
  2. When encoding, enable Adobe delimiters if the target format expects <~ and ~>. Disable them for a raw Ascii85 field.
  3. 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.
  4. 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.
  5. 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 Decode Zero-group shorthand. A z at a group boundary expands to four zero bytes; it is not valid inside a partial group.
f <~Ac~> Encode Adobe delimiters: Adobe wrapped; z shorthand: Use z shorthand — Partial one-byte input. A one-byte tail produces two Ascii85 characters rather than a padded five-character group.
你好 <~jLq5JV7c~> Encode Adobe delimiters: Adobe wrapped; z shorthand: Use z shorthand — Unicode UTF-8. Six UTF-8 bytes become one full Ascii85 group plus a two-byte partial group.

Ascii85 syntax accepted by the decoder

A wrapped value must contain both Adobe delimiters and they must surround the entire non-whitespace content. A start marker without an end marker, nested markers, or extra data after the end marker is invalid. An unwrapped value must not contain either marker.

Regular digits range from ASCII code 33 (!) through 117 (u). The special z token is accepted only when no regular digits are waiting in the current group. This implementation does not accept the y shorthand used by some btoa variants, because y is not part of Adobe Ascii85.

  • ASCII whitespace is ignored during decoding; arbitrary Unicode whitespace is not silently removed.
  • A regular group contains exactly five characters and produces four bytes.
  • The final group may contain two, three, or four characters, but never one.
  • The value uuuuu exceeds 0xFFFFFFFF and is rejected as an overflowing group.
  • The z shorthand expands to four zero bytes only at a group boundary.

How Ascii85 encodes full and partial groups

For each four-byte group, the encoder constructs a 32-bit unsigned value in big-endian order. It divides that value by 85 repeatedly to obtain five base-85 digits, then adds 33 to each digit so it falls in the printable ! through u range. A zero value would normally become !!!!!, but Adobe’s z shorthand may replace that complete five-character sequence.

A partial group is padded with zero bytes only for the arithmetic. If n source bytes are present, the encoder emits n plus one characters and discards the remaining temporary digits. The decoder reverses this by padding the final characters with u, decoding a full numeric group, and keeping one fewer byte than the number of original characters. This rule is why blindly padding with ! would produce the wrong result.

Decoder overflow checks are important because 85^5 permits values larger than a 32-bit word. A five-character sequence can be made entirely from legal symbols and still exceed 4,294,967,295. The converter reports that condition instead of wrapping the number and producing unrelated bytes.

Where Adobe-style Ascii85 appears

Ascii85 is most relevant when interoperating with formats that already define it. It is denser than hexadecimal and can remain readable ASCII, but its punctuation-heavy alphabet is not naturally URL-safe.

Use case Description
PostScript streams Adobe introduced Ascii85 so binary stream data could be represented compactly inside text-oriented PostScript documents.
PDF data inspection PDF objects may use an ASCII85Decode filter, often with Adobe-style stream conventions and whitespace.
Legacy data exchange Some tools and archives expose Ascii85 fields where preserving delimiters and partial-group rules is essential.
Encoding implementation tests Zero blocks, one-byte tails, whitespace, and overflow groups provide useful edge cases for byte-processing libraries.
Compact printable fixtures Four bytes become five characters, making Ascii85 more compact than hex while still viewable in a text file.

Ascii85 errors and ambiguous Base85 names

The label Base85 does not identify one universal alphabet. Z85, RFC 1924’s IPv6 representation, btoa, and Adobe Ascii85 differ in symbols, wrappers, shorthand, or block requirements. A value from one variant may use legal-looking characters yet decode differently or fail here.

This page’s errors are intentionally specific to Adobe-style Ascii85. It accepts whitespace and z, but not y; it permits partial final groups, but not a single trailing digit; and it accepts delimiters only as a matched outer pair.

  • A z after one or more pending digits is invalid because it cannot split a group.
  • A lone <~ or ~> marker is invalid.
  • Characters after u, except the standalone z shorthand, are outside the alphabet.
  • A one-character tail cannot encode a byte.
  • Decoded binary bytes may be valid Ascii85 but invalid UTF-8 text.

Ascii85 compared with Z85 and Base64

Ascii85 and Z85 both use eighty-five symbols, but Z85 uses a different carefully selected alphabet, requires input lengths divisible by four, and has no Adobe delimiters or z shorthand. They are not interchangeable despite sharing the Base85 name.

Base64 is less dense but has a far more common interoperable standard. Base64url further avoids URL-reserved + and /. Ascii85 uses many punctuation characters, so it is best kept in formats that explicitly specify it.

Format Description
Z85 Uses a different alphabet and fixed four-byte blocks. This tool does not implement Z85.
Base64 Produces eight characters for six bytes and is supported broadly in web, MIME, and API tooling.
Hexadecimal Is much easier to inspect and map to bytes, but needs eight characters for every four-byte group.

Ascii85 encoder and decoder FAQ

Is Base85 the same as Ascii85?

Base85 is a family name. This page implements Adobe-style Ascii85 with ! through u digits, optional <~ ~> delimiters, partial final groups, and the z zero-block shorthand.

What do the <~ and ~> markers mean?

They are Adobe delimiters that mark the beginning and end of a complete Ascii85 value. They are optional in this tool but, when used, must appear as a matched outer pair.

Why is z allowed but not y?

Adobe Ascii85 defines z as shorthand for four zero bytes. The y shorthand for four spaces belongs to some other implementations and is intentionally rejected to keep the variant boundary clear.

Can Ascii85 contain spaces and line breaks?

The decoder ignores ASCII whitespace, which is common in PostScript and PDF streams. The encoder itself emits a continuous string and does not insert wrapping.

Why is a one-character final group invalid?

A partial group with n bytes requires n+1 Ascii85 characters. Therefore two characters are the minimum needed to recover one byte; one character carries insufficient information.

Does Ascii85 encrypt the data?

No. It is a reversible printable representation. Anyone with the string can decode the bytes, and the format provides no checksum or authentication by itself.

Related encoding tools

View all tools

Cookie Preferences

Manage your cookie preferences. Necessary cookies cannot be disabled.

Necessary

Required

Required for language selection, privacy choices, and basic site functionality.

Cookies: NEXT_LOCALE

Analytics

Optional analytics cookies help us understand traffic and improve the website.

Cookies: _ga, _gid, _gat, _clck, _clsk

Advertising

Optional advertising cookies may be used to show relevant ads and measure performance.

Cookies: __gads, _gcl_au, IDE