Search for a tool
ASCII85 Encoding

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.

Results

ASCII85 Encoding -

Tag(s) : Character Encoding

Share
Share
dCode and more

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!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'ASCII85 Encoding' tool for free! Thank you!

ASCII85 Encoding

ASCII85 Decoder

 













ASCII85 Encoder

 


Answers to Questions (FAQ)

What is ASCII85? (Definition)

ASCII85 is a character encoding using 85 ASCII symbols. Popularized by the PDF format, it allows a little lighter encoding than Base64.

This encoding is sometimes called Base85 but it is not an arithmetic base change to base 85.

How to encrypt using ASCII85 encoding?

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. thus 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)

How to decrypt ASCII85 encoding?

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

What characters does ASCII85 use?

The encoding table used by ASCII-85 is the ASCII table (starting at the first printable character)

IndexAsc85IndexAsc85IndexAsc85IndexAsc85IndexAsc85
0 !1"2#3$4%
5&6'7(8)9*
10+11,12-13.14/
150161172183194
205216227238249
25:26;27<28=29>
30?31@32A33B34C
35D36E37F38G39H
40I41J42K43L44M
45N46O47P48Q49R
50S51T52U53V54W
55X56Y57Z58[59\
60]61^62_63`64a
65b66c67d68e69f
70g71h72i73j74k
75l76m77n78o79p
80q81r82s83t84u

With the variant IPv6, the alphabet used is 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~

With the variant ZeroMQ, the alphabet used is 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#

How to recognize an ASCII85 ciphertext?

The message uses only ASCII characters of codes 33 (!) to 117 (u) with sometimes spaces, carriage return, but also sometimes 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)

With IPv6 or ZeroMQ variants the characters are different (but there is no prefix)

What is the Adobe b85 variant?

Adobe Base85 is used in PDF files, it begins with <~ and ends with ~> and authorizes z exception.

What is the IPv6 variant?

In order to store shorter IPv6s, RFC 1924 proposed a compact representation using the mathematical base 85 and the symbols 0–9, A–Z, a–z, !#$%&()*+-;<=>?@^_`{|}~.

This page only reuses this alphabet and ASCII85 does not allow IPv6 encoding as provided by the RFC.

What is the ZeroMQ variant?

ZeroMQ is a messaging tool that uses Base85 in a function named zmq_z85_encode(), the 85 symbols used are: 0-9, a-z, A-Z, .-:+=^!/*?&<>()[]{}@%$#

ZeroMQ's conversion function is different from ASCII85, this page only uses the alphabet.

What is the '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)

What is the 'y' exception?

The character y is used to indicate a group of spaces. (not compatible with Adobe)

When was ASCII85 invented?

ASCII85 code was created around 1990 by Paul E. Rutter.

Source code

dCode retains ownership of the "ASCII85 Encoding" source code. Except explicit open source licence (indicated Creative Commons / free), the "ASCII85 Encoding" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "ASCII85 Encoding" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "ASCII85 Encoding" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.

Cite dCode

The copy-paste of the page "ASCII85 Encoding" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
ASCII85 Encoding on dCode.fr [online website], retrieved on 2024-11-17, https://www.dcode.fr/ascii-85-encoding

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'ASCII85 Encoding' tool for free! Thank you!


https://www.dcode.fr/ascii-85-encoding
© 2024 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.
 
Feedback