UTILS.
100% in-browser
🔠

Ascii85 / Base85 Encode & Decode

Encode bytes to Ascii85/Base85 and decode them back, supporting the standard and Adobe (<~ ~>) variants, entirely in your browser.

— output appears here —

About this tool

The Ascii85 / Base85 tool converts binary data to and from Ascii85 (also called Base85), a text encoding that packs four bytes into five printable characters — about 25% more compact than Base64. It is used inside PostScript and PDF streams (the Adobe variant) and in patch/diff formats. Everything runs locally in your browser with TextEncoder/TextDecoder; nothing you paste is uploaded.

Encoding processes the input as 4-byte big-endian groups, reads each group as a 32-bit unsigned integer, and emits five digits by repeatedly taking the value modulo 85 and adding 33, so each digit falls in the printable range '!' (33) to 'u' (117). An all-zero group collapses to the single character 'z'. A final partial group of n bytes (1–3) is zero-padded to four, encoded, and the last 4−n output characters are dropped, yielding n+1 characters. The Adobe variant wraps the result in '<~' and '~>'.

Decoding reverses the process: whitespace and any wrapper are stripped, 'z' expands to four zero bytes, five-character groups are read as value = Σ (cᵢ−33)·85^(4−i) and written as four big-endian bytes, and a trailing partial group of m characters (2–5) is padded with 'u' (value 84) and keeps m−1 bytes. Choose the direction, the standard or Adobe variant, and whether your input bytes are UTF-8 text or hex.

Frequently asked questions

What is the 'z' shortcut?
A group of four zero bytes (0x00000000) would encode as '!!!!!'. Ascii85 instead emits the single character 'z' for it as a compression shortcut. On decode, 'z' expands back to four zero bytes — but only when it appears at a group boundary, never in the middle of a five-character group.
How does Ascii85 differ from Base64?
Base64 encodes 3 bytes as 4 characters (33% overhead); Ascii85 encodes 4 bytes as 5 characters (25% overhead), so it is more compact. Base64 uses a 64-symbol alphabet, while Ascii85 uses 85 printable ASCII symbols from '!' to 'u'.
What is the Adobe variant?
Adobe's Ascii85, used in PostScript and PDF, wraps the payload between '<~' and '~>' delimiters. The core algorithm is identical. Selecting the Adobe variant adds those markers on encode and strips them on decode; the standard variant omits them.
Is my data uploaded anywhere?
No. Encoding and decoding happen entirely in your browser using plain JavaScript and TextEncoder/TextDecoder. Nothing is sent to a server, so you can safely process private or binary data.

More tools