Base85 Encoder / Decoder
A Base85 Encoder / Decoder converts binary data to and from an 85-character alphabet, packing four bytes into five characters for 25% overhead instead of Base64's 33%, supporting Adobe's Ascii85 as used in PDF and ZeroMQ's Z85.
Used inside PDF and PostScript streams. Supports the 'z' shorthand for four zero bytes and optional <~ ~> delimiters.
About Base85 Encoder / Decoder
Four bytes become one 32-bit integer written as five base-85 digits, which makes Base85 the densest of the common binary-to-text encodings — 25% overhead against Base64's 33%. Two flavours matter in practice. Ascii85 is Adobe's, embedded in PDF and PostScript streams, with a 'z' shorthand for four zero bytes and optional <~ ~> delimiters. Z85 is ZeroMQ's RFC 32, whose alphabet deliberately excludes quotes, backslashes and commas so the output can be pasted straight into source code, JSON or a shell command without escaping. Both are validated properly here, which is where most online encoders fall short: a five-character group can encode a value above 2^32-1 — 's8W-#' and anything above it — and that is malformed input which has to be rejected rather than silently wrapped. Z85 is also specified only for inputs that are a whole number of four-byte words, so this tool refuses a ragged input by default and, if you ask it to pad anyway, tells you the padding is not recoverable by a decoder.
What Base85 Encoder / Decoder does
- Ascii85 (Adobe) with the 'z' zero shorthand and optional <~ ~> delimiters
- Z85 (ZeroMQ RFC 32) with its source-code-safe alphabet
- Rejects groups that overflow 32 bits instead of wrapping silently
- Enforces Z85's four-byte word requirement, with opt-in padding that warns
- Decodes btoa's non-standard 'y' shorthand, and flags it as non-standard
- Input and output as text, hex bytes or Base64
- Shows the real size overhead so you can compare against Base64
When to reach for Base85 Encoder / Decoder
- Reading an Ascii85 stream out of a PDF or PostScript file
- Embedding a binary key in source code or JSON without escaping problems
- Squeezing binary into a text field where Base64 would not fit
- Encoding a ZeroMQ CURVE key for a configuration file
How to use Base85 Encoder / Decoder
- 01
Choose the variant
Ascii85 for PDF and PostScript data, Z85 for ZeroMQ and anything going into source code.
- 02
Set how the input should be read
Switch from text to hex when the input is raw binary such as a key — Z85 in particular is almost always applied to bytes, not prose.
- 03
Set the options
For Ascii85, optionally wrap the output in <~ ~> or collapse zero groups to 'z'. For Z85, decide whether a ragged input should be zero-padded.
- 04
Copy or round-trip
Copy the output, or send it back to the input to confirm it decodes to what you started with.
When to use Base85 Encoder / Decoder vs alternatives
| Alternative | Use Base85 Encoder / Decoder when… | Use the alternative when… |
|---|---|---|
| Base64 | you need the extra density — 25% overhead against 33% — or you are working with PDF or ZeroMQ data that is already Base85. | you need maximum compatibility; Base64 is understood everywhere and Base85 is not. |
| Other online Ascii85 tools | you want overflow groups rejected rather than wrapped, Z85's word requirement enforced, and hex input for real binary. | you only need a quick one-off conversion of plain text. |