Base32
Base32 maps binary data onto a 32-character alphabet (A-Z and 2-7); the output uses only uppercase letters and digits, which makes it easy to read aloud and type by hand.
Purpose
It represents binary data safely in case-insensitive environments (such as file systems and DNS) and reduces manual transcription errors.
Mechanism
The input is processed in 5-byte (40-bit) groups split into eight 5-bit units, each mapped to one character of the 32-character alphabet. A final short group is padded with = to the 8-character boundary, and the encoded length is about 8/5 of the input.
Use cases
- TOTP / HOTP shared secrets
- NSEC3 hash representation in DNS
- BitTorrent magnet links
- Manual entry of paper-backed-up keys
Examples
- Input
HelloOutputJBSWY3DPRFC 4648 standard alphabet
Common errors
- Confusing the RFC 4648 standard alphabet with the z-base-32 alternative alphabet
- State which variant is used and document its alphabet
Related terms
Base64
Base64 maps arbitrary binary data onto 64 printable ASCII characters (A-Z, a-z, 0-9, +, /) so that binary data can travel over text-only channels. GLOSSARY
Base16
Base16 is hexadecimal encoding: every 4 bits map to one hexadecimal character (0-9, A-F), making it the simplest member of the Base family defined by RFC 4648. GLOSSARY
Hexadecimal
Hexadecimal (hex) is the base-16 numeral system, using 0-9 and A-F for 0-15; it is one of the most common radix notations in computing. GLOSSARY
Multibase
Multibase is a self-describing encoding prefix scheme: a single-character prefix identifies the encoding of the data that follows (e.g., B for Base64, f for hex, z for Base58BTC), proposed by IPFS/Multiformats. GLOSSARY