Tool for decoding / encoding in Base32 according to RFC 4648. Base 32 is a variant of Base64 which uses letters and numbers from 2 to 7 (and =) as basic symbols.
Base32 - 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 Base32 code is an encoding standard described in RFC 4648 in order to facilitate the transmission of binary strings via 32 characters of the ASCII table.
The Base32 uses 32 characters: ABCDEFGHIJKLMNOPQRSTUVWXYZ234567 and the = symbol optionally used as the final character (as in Base64).
The message to be encoded is first treated as a binary string (according to a predefined encoding such as ASCII or Unicode).
Example: Base is encoded in ASCII (8-bit) 01000010,01100001,01110011,01100101
The string is then split every 5 bits, and optionally completed with 0s.
Example: The split gives the 32 bits 01000,01001,10000,10111,00110,11001,01 (three 0 needed at the end)
Each 5-tuple is then encoded in base 32 by the letter or the corresponding number according to the conversion table:
Binary | Decimal | Base32 |
---|---|---|
00000 | 0 | A |
00001 | 1 | B |
00010 | 2 | C |
00011 | 3 | D |
00100 | 4 | E |
00101 | 5 | F |
00110 | 6 | G |
00111 | 7 | H |
01000 | 8 | I |
01001 | 9 | J |
01010 | 10 | K |
01011 | 11 | L |
01100 | 12 | M |
01101 | 13 | N |
01110 | 14 | O |
01111 | 15 | P |
10000 | 16 | Q |
10001 | 17 | R |
10010 | 18 | S |
10011 | 19 | T |
10100 | 20 | U |
10101 | 21 | V |
10110 | 22 | W |
10111 | 23 | X |
11000 | 24 | Y |
11001 | 25 | Z |
11010 | 26 | 2 |
11011 | 27 | 3 |
11100 | 28 | 4 |
11101 | 29 | 5 |
11110 | 30 | 6 |
11111 | 31 | 7 |
Example: 01000 for I, 01001 for J, and so on. Until IJQXGZI
The standard indicates that the Base32 message must have a number of characters multiple of 8. The message obtained must therefore be completed with the character = (padding char).
Example: Finally, the message Base is base32-encoded IJQXGZI=
The Base32 decoding is similar to a mathematical base change.
Example: Decode the message INXWIZI= coded in Base 32
Delete the final = of the encoded message.
Example: INXWIZI= becomes INXWIZI
Replace each character with its 5-bit value (cf conversion table) to create a binary string.
Example: I for 01000, N for 01101, etc. Until 01000,01101,10111,10110,01000,11001,01000
Read the binary string according to the encoding used (ASCII, Unicode, etc.)
A B32-encoded message
— is composed only of the characters 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567 =' (no 0,1,8,9)
— theoretically has a number of character multiple of 8.
— ends with 0,1,3,4 or 6 characters = (equal).
— has a length greater than 40 to 60% of the original message
The digit 0 is avoided not to be confused with the letter O, and the number 1 is also avoided for its resemblance to the letter I.
Base32 is similar to Base64 which is much more commonly used.
The zbase32 code is a Base32 variant wanting to be more human-readable and writable.
The mathematical basis 32 (or base32hex) is the most natural version for writing numbers in base 32 and uses the symbols 0123456789abcdefghijklmnopqrstuv
dCode retains ownership of the "Base32" source code. Except explicit open source licence (indicated Creative Commons / free), the "Base32" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Base32" 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 "Base32" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.
The copy-paste of the page "Base32" 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):
Base32 on dCode.fr [online website], retrieved on 2024-11-17,