Glossary Data & Encoding

Base32

Base32 is an encoding that represents binary data using 32 safe characters, the letters A to Z and the digits 2 to 7.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

Base32 (RFC 4648) splits the input into groups of 5 bytes (40 bits) and writes each as 8 characters of 5 bits. Every 5 bytes become 8 characters, so the output is 60% larger than the input, against about 33% for Base64. A last group shorter than 5 bytes is padded with = to a full 8 characters. There are variants: base32hex uses 0-9A-V, and Crockford's Base32 drops the confusable letters I, L, O and U.

Why it matters

Because it uses only one letter case and omits the digits 0 and 1 (easily confused with O and I), Base32 survives being read aloud, typed by hand or handled by case-insensitive systems. That is why authenticator-app (TOTP) secrets are shown in Base32, usually in groups of four and without padding. Decoding with the wrong alphabet or variant gives garbage rather than an error.

Example

Hello is exactly 5 bytes, so it encodes to 8 characters with no padding: JBSWY3DP. Hi is 2 bytes and becomes JBUQ====, four data characters plus four padding signs.

AdSense Placeholder
Slot: footer_leaderboard