Codec lesson · Base32
Base32: represent bytes with a 32-symbol alphabet
Base32 uses uppercase A–Z and digits 2–7. Its alphabet avoids visually ambiguous 0, 1, 8, and 9, but the encoded result is longer than Base64.
Completed in this browser
Recognize RFC 4648 Base32, explain its padding, and validate canonical Base32 before decoding it as UTF-8 text.
Encode Keyboard groups UTF-8 bits into five-bit values, maps them to the RFC 4648 Base32 alphabet, and pads the result to an eight-character boundary with =.
How Encode Keyboard handles it
Convert text to UTF-8
All characters, including Vietnamese and emoji, begin as bytes.
Read five bits at a time
Each value from 0 to 31 selects A–Z or 2–7.
Require canonical blocks
Decode accepts uppercase symbols and trailing padding only when re-encoding produces the same value and the bytes form valid UTF-8.
Worked example
HiJBUQ====Two input bytes leave a partial five-bit group, so four = characters complete the eight-character block.
Good uses
- Learning binary-to-text encodings
- Inspecting values explicitly documented as RFC 4648 Base32
- Sharing non-sensitive text in a case-stable alphabet
Validation and common errors
- Use uppercase A–Z and digits 2–7 only
- Keep = only at the end and use the canonical count
- The total canonical length must be a multiple of eight
Practice in your browser
This uses the same documented rules as the app and runs only in this tab.