Base85 to TSV Converter
Convert Base85 (ASCII85/Z85) encoded data to TSV format. Decode Base85 strings and export as tab-separated values instantly in your browser.
About
Base85 encoding represents binary data using 85 printable ASCII characters, achieving a 25% size overhead compared to the 33% of Base64. The ASCII85 variant (used in Adobe PostScript and PDF streams) maps each group of 4 bytes to 5 characters from the range ! (0x21) through u (0x75). Misidentifying the encoding variant or corrupting a single character produces garbage output that silently propagates through data pipelines. This tool decodes both ASCII85 (with <~ / ~> delimiters) and Z85 variants, then structures the decoded content into proper TSV with correct field separation and escaping.
The converter auto-detects the Base85 variant, validates character ranges, handles the z abbreviation for null-word compression, and manages final-group padding arithmetic. Output fields containing tabs or newlines are escaped per RFC 4180 conventions adapted for TSV. Note: this tool assumes the decoded payload is UTF-8 text with row/column structure. For raw binary payloads, a hex-dump TSV mode is provided.
Formulas
ASCII85 decoding converts each group of 5 encoded characters into 4 binary bytes. Each character ci is mapped to a value vi = ci − 33, where vi ∈ [0, 84].
The resulting 32-bit unsigned integer is then split into 4 bytes (big-endian):
byte1 = (value >> 16) & 0xFF
byte2 = (value >> 8) & 0xFF
byte3 = value & 0xFF
For the final partial group of n characters (2 ≤ n ≤ 4), the group is right-padded with u characters (value 84) to form 5, decoded, then only the first n − 1 bytes are kept.
Where ci = the ASCII code point of the i-th encoded character, vi = decoded digit value, value = the 32-bit accumulator, and n = number of characters in the final partial group.
Reference Data
| Property | ASCII85 (Adobe) | Z85 (ZeroMQ) | Base64 |
|---|---|---|---|
| Alphabet Size | 85 chars | 85 chars | 64 chars |
| Character Range | ! to u (0x21-0x75) | 0 - 9, a - z, A - Z, .-:+=^!/*?&<>()[]{}@%$# | A - Z, a - z, 0 - 9, +/ |
| Encoding Ratio | 5:4 (chars:bytes) | 5:4 (chars:bytes) | 4:3 (chars:bytes) |
| Size Overhead | 25% | 25% | 33% |
| Null Compression | z → 4 zero bytes | None | None |
| Delimiters | <~ ... ~> | None | None (or = padding) |
| Padding | Implicit (final group) | Input must be multiple of 4 | = characters |
| Whitespace | Ignored | Not allowed | Ignored (some parsers) |
| Use Cases | PostScript, PDF, btoa | ZeroMQ, CurveZMQ | Email, URLs, JSON |
| Max value per group | 855 − 1 = 4,437,053,124 | 855 − 1 = 4,437,053,124 | 644 − 1 = 16,777,215 |
| Bytes per group | 4 | 4 | 3 |
| RFC / Spec | btoa(1), Adobe spec | ZeroMQ RFC 32 | RFC 4648 |
| Error Detection | Invalid char > u | Invalid char outside alphabet | Invalid char outside alphabet |
| TSV Escape Rule | Fields containing \t, \n, or " are double-quoted; internal quotes doubled | ||