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.
Base-32 Crockford - 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!
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 checksum.
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
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:
00000 | 0 | 00001 | 1 | 00010 | 2 | 00011 | 3 |
---|---|---|---|---|---|---|---|
00100 | 4 | 00101 | 5 | 00110 | 6 | 00111 | 7 |
01000 | 8 | 01001 | 9 | 01010 | A | 01011 | B |
01100 | C | 01101 | D | 01110 | E | 01111 | F |
10000 | G | 10001 | H | 10010 | J | 10011 | K |
10100 | M | 10101 | N | 10110 | P | 10111 | Q |
11000 | R | 11001 | S | 11010 | T | 11011 | V |
11100 | W | 11101 | X | 11110 | Y | 11111 | Z |
Example: The coded message is C9GQ6S8
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
Crockford base-32 decryption starts with a conversion of characters into binary form via the lookup table
0 | 00000 | 1 | 00001 | 2 | 00010 | 3 | 00011 |
---|---|---|---|---|---|---|---|
4 | 00100 | 5 | 00101 | 6 | 00110 | 7 | 00111 |
8 | 01000 | 9 | 01001 | A | 01010 | B | 01011 |
C | 01100 | D | 01101 | E | 01110 | F | 01111 |
G | 10000 | H | 10001 | J | 10010 | K | 10011 |
M | 10100 | N | 10101 | P | 10110 | Q | 10111 |
R | 11000 | S | 11001 | T | 11010 | V | 11011 |
W | 11100 | X | 11101 | Y | 11110 | Z | 11111 |
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
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.
Originally Base 32 was created to express large numbers, such as public encryption keys.
More infos here
dCode retains ownership of the "Base-32 Crockford" source code. Any algorithm for the "Base-32 Crockford" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Base-32 Crockford" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Base-32 Crockford" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Base-32 Crockford" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Base-32 Crockford on dCode.fr [online website], retrieved on 2025-04-16,