Skip to content
uencoder

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
    Hello
    Output
    JBSWY3DP

    RFC 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

Related tools

References