User Rating 0.0
Total Usage 0 times
0 chars
0 chars
Is this tool helpful?

Your feedback helps us improve.

About

ASCII85 and Base64 are binary-to-text encoding schemes with different density characteristics. ASCII85 encodes 4 bytes into 5 characters (a 25% overhead), while Base64 encodes 3 bytes into 4 characters (a 33.3% overhead). Converting between them requires full binary round-tripping: the source encoding is decoded to raw bytes, then re-encoded in the target format. A character-level transliteration is not possible because the two schemes use incompatible group sizes and arithmetic bases.

Incorrect conversion - truncating padding, mishandling the z zero-group abbreviation, or confusing Adobe's <~ / ~> delimiters with payload data - corrupts the binary stream silently. This tool performs byte-accurate decoding with strict validation: out-of-range characters (< 33 or > 117 in ASCII), illegal z placement inside partial groups, and overflow past 232 1 are all caught and reported. This tool approximates lossless conversion assuming well-formed input conforming to the btoa specification (RFC 1924 variant excluded).

ascii85 base85 base64 encoding converter binary btoa85 data-encoding

Formulas

ASCII85 encodes a 4-byte block as a base-85 big-endian number spread across 5 characters, each offset by 33 to stay in the printable ASCII range.

value = b0 × 2563 + b1 × 2562 + b2 × 256 + b3
ci = floor(value85(4 i)) mod 85 + 33

where b0b3 are the input bytes and c0c4 are the output ASCII codes. Valid output characters range from ! (ASCII 33) to u (ASCII 117). A special abbreviation z represents four zero bytes (value = 0).

Base64 encodes 3 bytes into 4 characters by splitting 24 bits into four 6-bit indices into the alphabet A - Z, a - z, 0-9, +, /.

idx0 = b0 >> 2
idx1 = ((b0 & 3) << 4) | (b1 >> 4)
idx2 = ((b1 & 15) << 2) | (b2 >> 6)
idx3 = b2 & 63

The conversion pipeline is: Source Encoding → Raw Byte Array → Target Encoding. No shortcut exists because the group boundaries of 4-byte (ASCII85) and 3-byte (Base64) blocks are co-prime.

Reference Data

PropertyASCII85 (Base85)Base64
Character Set85 printable ASCII (! to u)64 chars: A - Z, a - z, 0-9, +, /
Encoding Ratio4 bytes → 5 chars3 bytes → 4 chars
Size Overhead25%33.3%
PaddingImplicit (short final group)Explicit (= or ==)
Zero Compressionz4 zero bytesNone
Delimiters (Adobe)<~ ... ~>None
WhitespaceIgnored between charsIgnored (per RFC 2045)
Common UsePostScript, PDF streamsEmail (MIME), Data URIs, JWT
Base Radix8564 (26)
Bits per Char6.41 bits6.00 bits
Group Size (input bytes)43
Group Size (output chars)54
Max Value per Group855 1 = 4,437,053,124224 1 = 16,777,215
RFC / StandardNo formal RFC (Adobe spec)RFC 4648
URL-Safe VariantZ85 (ZeroMQ)Base64url (- and _)
Efficiency vs Hex more compact1.5× more compact
Binary SafetyYes (all printable)Yes (all printable)
Sorting Preserves OrderYes (ASCII order = numeric)No (alphabet mapping differs)
Line Length Convention80 chars (Adobe)76 chars (MIME RFC 2045)

Frequently Asked Questions

The converter automatically strips Adobe-style <~ and ~> delimiters before processing. If your ASCII85 input includes them, they are removed silently. If it does not include them, the raw payload is decoded directly. Output never includes delimiters - add them manually if your target system requires the Adobe PostScript format.
The z abbreviation is a compression shortcut: it represents exactly 4 zero bytes (0x00000000). It may only appear where a full 5-character group would begin. A z embedded inside a partial group is an encoding error, and this tool will report it. Each z expands to four null bytes before re-encoding into Base64 (AAAAAA== per group boundary).
Yes, for well-formed input. The intermediate representation is a raw byte array, which is encoding-agnostic. Converting ASCII85 → Base64 → ASCII85 produces identical bytes. However, whitespace and z-abbreviation choices in the original ASCII85 may not be preserved - the re-encoded output uses canonical formatting without z compression or line breaks.
Five ASCII85 characters encode a 32-bit unsigned integer. The maximum valid value is 232 1 = 4,294,967,295, but 855 1 = 4,437,053,124. Character groups that decode to values between 4,294,967,296 and 4,437,053,124 are mathematically valid in base-85 but exceed 32 bits - producing corrupt data. This tool detects and rejects such groups.
No. RFC 1924 uses a different 85-character alphabet (0-9, A - Z, a - z, then special characters in a non-sequential order) and encodes 128-bit values as 20 characters. This tool implements the Adobe / btoa variant where characters range from ! (ASCII 33) to u (ASCII 117). Z85 (ZeroMQ) is also a distinct variant and is not supported.
The tool processes up to 5 MB of text input in the browser. For typical payloads (configuration files, embedded assets, certificate data), this is more than sufficient. Beyond that limit, browser memory constraints and single-thread blocking become problematic. For very large files, a streaming command-line tool is more appropriate.