We use cookies to understand how DevToolsHub is used and to improve your experience. You can choose which types of cookies to allow.
Encode text to Base32 and decode Base32 to text.
Loading...
Loading...
Base32 is a binary-to-text encoding scheme that converts binary data into a sequence of printable ASCII characters. It is defined in RFC 4648 and uses a 32-character alphabet: the uppercase letters A–Z and the digits 2–7, with = used as padding when the input length is not a multiple of 5 bytes.
Here's how it works: every 5 bytes (40 bits) of input data are divided into eight 5-bit groups. Each 5-bit group maps to one of the 32 characters in the Base32 alphabet. This means that 8 characters of Base32 output represent 5 bytes of original data, making Base32-encoded data approximately 60% larger than the original binary. When the input is not a multiple of 5 bytes, the output is padded with = characters to make the output length a multiple of 8.
Base32 is not encryption — it provides no confidentiality or security. Anyone who has the Base32 string can decode it instantly. Its purpose is to ensure that binary data can be safely represented in text-based environments. The alphabet was deliberately designed to be case-insensitive and to avoid visually ambiguous characters: the digits 0 and 1 are excluded because they can be confused with the letters O and I.
A critical distinction is UTF-8 vs ASCII. When encoding text strings, it is essential to first convert the text to UTF-8 bytes before Base32 encoding. Characters like emoji (🎉), CJK characters (中文), and accented letters (café) require multiple bytes in UTF-8. Our tool correctly handles UTF-8 by using TextEncoder to convert the input string to UTF-8 bytes before encoding, ensuring full Unicode support including emoji, CJK, and all special characters.
RFC 4648 also defines an Extended Hex variant of Base32, which uses the alphabet 0123456789ABCDEFGHIJKLMNOPQRSTUV. This variant maps each 5-bit group to a character whose value corresponds directly to the bit pattern, making it useful in contexts that require case-insensitive sorting, such as DNS names and file systems. Our tool supports both variants — just toggle the variant selector to switch between them.
Both Base32 and Base64 serve the same fundamental purpose — encoding binary data as text — but they make different trade-offs between size efficiency and human usability. Understanding these differences helps you choose the right encoding for your use case.
a and A represent different values. This makes Base32 safer in environments where case folding may occur.Loading...