Z85 encode & decode (ZeroMQ)

Client

Z85 (ZeroMQ spec 32) encodes each group of four big-endian bytes as five characters from a fixed 85-character alphabet—optimized for code and text, and distinct from Adobe ASCII85. This page follows the published test vector; decode expects length multiple of 5; encode UTF-8 text and pad to a 4-byte boundary with trailing zeros when you use the button below.

Part of encoding tools.

Workspace

Encode from UTF-8 (with optional length padding) or paste Z85; whitespace is ignored on decode.

Z85 (ZeroMQ)

?

Encode needs a byte length that is a multiple of 4. This workspace UTF-8 encodes your text, then (if needed) zero-pads the tail so you can paste small strings; remove padding in your own protocol if you must not append nulls.

Decode requires a string whose length (after removing spaces) is a multiple of 5, per RFC 32. This is a different 85-symbol alphabet from Adobe ASCII85.

Common use cases

  • Interoperate with ZeroMQ/libzmq tools that use zmq_z85_encode / zmq_z85_decode for curve keys and binary frames.
  • Compare the HelloWorld 8-byte test vector with another implementation while debugging.
  • Round-trip small UTF-8 samples when a multiple-of-4 byte length is available (or accept zero padding from this workspace).

Common mistakes to avoid

  • Assuming the same as Adobe ASCII85

    Z85 and Adobe ASCII85 both map 4 bytes to 5 characters, but the alphabets and rules differ. Use the ASCII85 page for PDF-style streams.

  • Ignoring length rules

    Encode needs input length multiple of 4; decode (after spaces removed) must be a multiple of 5. The RFC does not add padding bytes for you in wire formats.

  • Zero padding surprises

    When you encode an odd length in UTF-8, this page pads with trailing 0x00 to reach a multiple of 4. That is convenient for demos, not a substitute for your protocol’s framing.

FAQ

What is the standard test vector?

RFC 32 gives 8 bytes 86 4F D2 6F B5 59 F7 5B which must encode to the ten characters HelloWorld (two Z85 blocks).

Is this safe for JSON or shell?

Z85 is designed to be “string safe” in quotes and on the command line (see the ZeroMQ spec).

Does my data leave the browser?

No. Encoding and decoding run only in your tab.

Common search terms

Phrases people search for that match this tool. See the full long-tail keyword index.

  • z85 encode decode online
  • zeromq z85 rfc 32
  • z85 base85 hello world test vector
  • libzmq z85 string safe base85

Related utilities you can open in another tab—mostly client-side.