Base64 to Ascii85 Converter
Convert Base64 to Ascii85 (btoa) and Ascii85 to Base64 encoding online. Real bidirectional conversion with delimiter handling and validation.
About
Base64 inflates binary data by approximately 33% because it maps every 3 bytes to 4 ASCII characters using a 64-symbol alphabet. Ascii85 (also called Base85 or btoa encoding) reduces that overhead to roughly 25% by encoding 4 bytes into 5 characters drawn from a 85-character range (! through u, ASCII codes 33 - 117). The format was adopted by Adobe PostScript and PDF internals, where every kilobyte of payload size matters for render performance. This tool performs real byte-level conversion between the two encodings. It does not transliterate strings; it decodes one encoding to its raw binary form and re-encodes it in the target format. Malformed input - wrong character sets, broken padding, or missing <~~> delimiters - will produce a specific validation error rather than silent corruption.
Formulas
Ascii85 encodes a group of 4 bytes into 5 printable ASCII characters. The 4 bytes are treated as a big-endian 32-bit unsigned integer N, then decomposed by successive division by 85:
Where b0โฆb3 are the input bytes (big-endian order), c0โฆc4 are the output ASCII code points, and 33 is the offset to shift into printable range (starting at !). If N = 0, the entire 5-character group is replaced with the single character z. For a trailing group of n bytes (1 - 3), pad with zero bytes to 4, encode normally, then output only the first n + 1 characters.
Reference Data
| Property | Base64 (RFC 4648) | Ascii85 (btoa / Adobe) |
|---|---|---|
| Alphabet size | 64 symbols | 85 symbols |
| Character range | A - Z, a - z, 0 - 9, +, / | ASCII 33 (!) to 117 (u) |
| Padding character | = (up to 2) | None (length-implied) |
| Delimiters | None | <~ ... ~> |
| Input block size | 3 bytes | 4 bytes |
| Output block size | 4 characters | 5 characters |
| Expansion ratio | 4รท3 ≈ 1.333 | 5รท4 = 1.25 |
| Size overhead | ≈ 33.3% | ≈ 25% |
| Zero-block shortcut | No | z = 4 null bytes |
| Whitespace handling | Ignored by most decoders | Ignored between delimiters |
| Primary use case | Email (MIME), URLs, JSON, XML | PostScript, PDF streams |
| Defined in | RFC 4648 (2006) | btoa(1) Unix, Adobe spec (1992) |
| URL-safe variant | Yes (- and _ replace + and /) | No standard variant |
| Bits per character | 6 | 6.41 (log285) |
| Max encodable value per block | 224 โ 1 | 232 โ 1 |
| Binary safety | Yes | Yes |