Dev tools

Base85 (Ascii85) encode

Base85 (Ascii85) encode. Runs on your device, nothing is uploaded.

Runs on your device. The file is never uploaded.

Base85 (Ascii85) encode maps every four bytes of a file onto five characters running from exclamation mark up to lowercase u. A short final group gives one character more than it had bytes. No wrapping delimiters are emitted and the z shorthand for four zero bytes never appears, so add either yourself if a reader expects them.

Input

Questions

Which Base85 variant is this?

Adobe Ascii85. Four bytes become five characters drawn from the 85 printable ASCII characters starting at exclamation mark and ending at lowercase u. It is the variant PostScript and PDF use, not Z85 and not the RFC 1924 IPv6 alphabet, both of which order their symbols differently.

Are the angle-bracket delimiters included?

No. Some Ascii85 producers wrap the text in a leading marker and a trailing one so a parser can find the block. This tool emits the encoded characters only, so add the wrapper yourself if the consumer expects it. The z shorthand for a group of four zero bytes is not used either; four zeros come out as five characters like anything else.

Why choose Base85 over Base64?

Size. Five characters per four bytes is 25 percent overhead, against 33 percent for Base64. The cost is that the alphabet includes quotes, backslashes and angle brackets, so Base85 output often needs escaping when it lands in JSON, XML or a shell command, whereas Base64 output rarely does.

What happens to a final partial group?

It is padded with zero bytes up to four, encoded as a full group, and then the last characters are dropped so a group of n bytes gives n plus one characters. A 6-byte file therefore ends with three characters instead of five. That is the standard Ascii85 rule, and it lets a decoder recover the exact length.

Is the output hidden or compressed?

Neither. The output is bigger than your input, not smaller, and it is fully reversible by anyone, with no key anywhere in the process. Compress the file first if size matters, because the encoding step adds a quarter on top of whatever it is given. Encrypt it first if the contents matter.

Does it upload anything?

No. Encoding happens in a Web Worker on your machine, so nothing is transmitted and no copy is retained. The tool is available offline after the first load, and if you drop several files each one is encoded separately with its own result you can copy on its own.

Related Dev tools