〜 ★ dCode presents ★ 〜

Base-32 Crockford

Tool to decode / encode with the Crockford Base-32. Crockford's Base32 is a variant of base 32 created by Douglas Crockford improving use by humans.

Crockford Base-32 Decoder

See also: Base32Z-Base-32

Crockford base-32 Encoder

See also: Base32Z-Base-32

Answers to Questions

What is the Crockford Base-32? (Definition)

The base-32 designed by Douglas Crockford is a variant of the base 32 (standard RFC 3548) willing to optimize the writing and reading by human and adding a sum of control. The Crockford base-32 uses 32 characters' 0123456789ABCDEFGHJKMNPQRSTVWXYZ 'ie the 36 alphanumeric characters excluding I,L,O to prevent confusion with digits and the letter' U 'which avoids unwanted puns (U=You).

Crockford optionally offers a modulo 37 checksum with 5 other characters: *~$=U

How to encrypt using Crockford Base-32 cipher?

The plain message is treated as a binary string and divided into 5-bit blocks (completed if necessary by 0).

Example: base is encoded in ASCII (8-bit) 01100010 01100001 01110011 01100101, the cutout gives the blocks 01100,01001,10000,10111,00110,11001,01000 (with three 0 added at the end)

Each block of 5 bits is encoded via the Crockford alphabet by its corresponding character:


Example: The coded message is C9GQ6S8

How to calculate the checksum character?

The original binary message is encoded as a (very large) integer whose modulo value 37 is calculated (37 is the smallest next prime number following 32).

Example: base encoded in binary 01100010011000010111001101100101 (base 2) corresponds to 1650553701 (in decimal) and 1650553701 mod 37 = 18 which is coded 18=J so the control character is' J'

Example: The message coded with the control character is C9GQ6S8J

How to decrypt using Crockford Base-32?

Crockford base-32 decryption starts with a conversion of characters into binary form via the lookup table


Example: The message 6CS0 corresponds to 00110,01100,11001,00000

The resulting binary string is then interpreted (depending on the encoding or format used)

Example: 00110011,00110010,0000 is the ASCII code of the string 32

How to recognize Crockford Base-32 ciphertext?

The message is composed of uppercase alphanumeric characters except I, L, O. It is also possible to find the characters *~$=U at the end of the coding data and sometimes the dash/hyphen - is used to promote reading.

More infos (link)

Source code

dCode retains ownership of the source code of the script Base-32 Crockford online. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, Matlab, etc.) which dCode owns rights will not be given for free. To download the online Base-32 Crockford script for offline use on PC, iPhone or Android, ask for price quote on contact page !

Questions / Comments

Team dCode likes feedback and relevant comments; to get an answer give an email (not published). It is thanks to you that dCode has the best Base-32 Crockford tool. Thank you.

Source : https://www.dcode.fr/crockford-base-32-encoding