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

Your feedback helps us improve.

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.

base85 ascii85 z85 tsv converter decoder tab-separated-values data-conversion

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].

value = v0 × 854 + v1 × 853 + v2 × 852 + v3 × 851 + v4

The resulting 32-bit unsigned integer is then split into 4 bytes (big-endian):

byte0 = (value >> 24) & 0xFF
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

PropertyASCII85 (Adobe)Z85 (ZeroMQ)Base64
Alphabet Size85 chars85 chars64 chars
Character Range! to u (0x21-0x75)0 - 9, a - z, A - Z, .-:+=^!/*?&<>()[]{}@%$#A - Z, a - z, 0 - 9, +/
Encoding Ratio5:4 (chars:bytes)5:4 (chars:bytes)4:3 (chars:bytes)
Size Overhead25%25%33%
Null Compressionz4 zero bytesNoneNone
Delimiters<~ ... ~>NoneNone (or = padding)
PaddingImplicit (final group)Input must be multiple of 4= characters
WhitespaceIgnoredNot allowedIgnored (some parsers)
Use CasesPostScript, PDF, btoaZeroMQ, CurveZMQEmail, URLs, JSON
Max value per group8551 = 4,437,053,1248551 = 4,437,053,1246441 = 16,777,215
Bytes per group443
RFC / Specbtoa(1), Adobe specZeroMQ RFC 32RFC 4648
Error DetectionInvalid char > uInvalid char outside alphabetInvalid char outside alphabet
TSV Escape RuleFields containing \t, \n, or " are double-quoted; internal quotes doubled

Frequently Asked Questions

The converter first checks for <~...~> delimiters, which are unique to ASCII85 (Adobe variant). If found, it strips them and decodes using the ASCII85 alphabet (characters ! through u, code points 33-117). If no delimiters are present, it analyzes the character set: ASCII85 uses sequential ASCII codes 33-117, while Z85 uses a non-sequential 85-character alphabet including digits, letters, and specific symbols like .-:+=^!/*?&<>()[]{}@%$#. The converter scores the input against both alphabets and selects the one with zero invalid characters. If both match (rare due to alphabet differences), ASCII85 is preferred as the more common variant.
When the decoded byte stream contains bytes outside valid UTF-8 ranges or includes control characters (except \t and \n), the converter switches to hex-dump TSV mode. Each row represents 16 bytes with three columns: the byte offset (hexadecimal), the hex values of each byte separated by spaces, and the ASCII representation where non-printable bytes are replaced with a period (.). This ensures binary payloads still produce a valid, inspectable TSV file.
Fields containing tab characters (\t), newline characters (\n or \r\n), or double-quote characters (") are enclosed in double quotes. Any internal double-quote characters are escaped by doubling them (""). This follows the quoting conventions adapted from RFC 4180 for CSV, applied to TSV output. Empty fields are preserved as empty strings between tab delimiters.
Each group of 5 ASCII85 characters decodes to a 32-bit unsigned integer. The maximum valid value is 85⁵ − 1 = 4,437,053,124, but the 32-bit limit is 2³² − 1 = 4,294,967,295. Certain character combinations produce values between 4,294,967,296 and 4,437,053,124 which cannot be represented in 4 bytes. This indicates corrupted or improperly encoded input. Verify the source encoder and check for character substitution errors, particularly confusion between similar-looking characters like l (lowercase L) and | (pipe).
For ASCII85 (Adobe variant), all whitespace characters (spaces, tabs, newlines, carriage returns) are stripped before decoding, as the specification permits arbitrary whitespace insertion for line-wrapping. For Z85, whitespace is not part of the specification and is treated as invalid characters. If your Z85 input contains line breaks from copy-paste operations, enable the "Strip whitespace" option to remove them before decoding.
In ASCII85, a standalone z character (not inside a 5-character group) is a shorthand for !!!!! which decodes to four zero bytes (0x00 0x00 0x00 0x00). This compression reduces the encoded size of null-heavy data. The z abbreviation may only appear where a full 5-character group would appear - never inside a partial final group. Z85 does not support this abbreviation. The converter correctly expands z to four null bytes during ASCII85 decoding.