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!
Encryption uses the binary code of the text (which depend on the encoding used: ASCII, Unicode, etc.)
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: 21 => ASCII(54) = 6, 79 => ASCII(112) = p, 76 => ASCII(106) = j etc.
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)
For each group of 5 characters, get the ASCII code and subtract 33.
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)
The plain text is then this binary code encoded with initial encoding (ASCII, Unicode, etc.), n last characters are ignored when n characters have been added in initial completion step.
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.
dCode retains ownership of the online 'ASCII85 Encoding' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any 'ASCII85 Encoding' algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any 'ASCII85 Encoding' function (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and no data download, script, copy-paste, or API access for 'ASCII85 Encoding' will be for free, same for offline use on PC, tablet, iPhone or Android ! dCode is free and online.
Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!
Thanks to your feedback and relevant comments, dCode has developed the best 'ASCII85 Encoding' tool, so feel free to write! Thank you!