Tool to decode/encode with ASCII85 (or Base85) is a coding system similar to base64, using 5 ASCII characters to code 4 bytes. ASCII 85 encoding is used in PDF file format for example.
ASCII85 Encoding - dCode
Tag(s) : Character Encoding
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Example: The message DCODE is encoded 01000100 01000011 01001111 01000100 01000101 (ASCII 8-bit encoding)
The binary string is then split every 32 bits (4 bytes)
Example: 01000100010000110100111101000100 (base2) = 1145261892 (base10) and 01000101000000000000000000000000 (base2) = 1157627904 (base10) (filled with 3 null characters = 24 times 0 to get 32 bits)
Numbers obtained are then converted to base 85.
Example: 1145261892 (base10) = [21,79,73,64,27] (base85) and 1157627904 (base10) = [22,15,0,26,69] (base85)
Each value in base 85 is replaced by an ASCII character of code (value+33)
Example: The encrypted message is 6pja<70
There could be some final null characters ASCII(0), that can be deleted (it corresponds to the previously added null characters)
The decryption start by splitting the text into groups of 5 characters (if the tuple is not 5-character long, it is filled with u)
Example: The message 6pja<70 is split into 6pja< and 70 (that is treated as 70uuu)
Example: 6pja< = 54,112,106,97,60 (ASCII codes), -33 => 21,79,73,64,27
Example: 70uuu = 55,48,117,117,117 (ASCII codes), -33 => 22,15,84,84,84
Every tuple of 5 numbers is then considered as a unique number written in base 85, and converted to base 2.
Example: [21,79,73,64,27] (base85) = 01000100010000110100111101000100 (base2)
Example: [22,15,84,84,84] (base85) = 01000101000010010101011000000101 (base2)
Example: 01000100 01000011 01001111 01000100 01000101 (00001001 01010110 00000101) = DCODE (ASCII 8bit encoding).
The message uses only ASCII characters of codes 33 to 117 with sometimes spaces, carriage return, but also characters y and z.
The message begins with <~ and ends with ~> (variant Adobe)
the message begins with xbtoa Begin and ends with xbtoa End (variant BTOA)
Adobe Base85 is used in PDF files, it begins with <~ and ends with ~> and authorizes z exception.
The character z is used (even if it is not in the character list) to indicate a group of 0, this trick allows reducing the size of the message. (used in Adobe and BTOA variants)
The character y is used to indicate a group of spaces. (not compatible with Adobe)
ASCII85 code was created around 1990 by Paul E. Rutter.