{ ILoveJS }

Base32 Encoder

Encode text to Base32 format.

base32encodeconvert

What is Base32 Encoder?

The Base32 Encoder converts plain text or binary data into Base32-encoded strings following the RFC 4648 standard. Base32 represents data using a 32-character alphabet (A–Z and 2–7), producing output that is safe for use in case-insensitive environments, URLs, file systems, and human-readable contexts where Base64 might introduce problematic characters.

Developers rely on Base32 encoding when working with systems that require compact, alphanumeric-only representations of binary data — most notably for TOTP and HOTP secret keys used in two-factor authentication (2FA), DNS labels, and data interchange formats where lowercase sensitivity or padding ambiguity can cause issues. Its alphabet avoids visually similar characters like 0, 1, 8, and 9, making it friendlier for manual entry and verification.

How to Use

Using the encoder is straightforward: paste or type your input text into the input field and the tool instantly outputs the Base32-encoded result. The encoder processes your text as UTF-8 by default, converting each character to its binary representation before grouping bits into 5-bit chunks and mapping them to the Base32 alphabet. The output will include = padding characters at the end when necessary to align the encoded string to a multiple of 8 characters, as required by RFC 4648.

The output is always uppercase, consisting exclusively of the characters A–Z and 2–7, plus any trailing = padding. For example, encoding the string hello produces NBSWY3DPEB3W64TMMQ======. Keep in mind that Base32-encoded output is approximately 60% larger than the original input due to the encoding overhead inherent in the 5-bit grouping scheme.

One important edge case to be aware of: Base32 is designed for binary or ASCII text data. If your source text contains complex Unicode characters (multi-byte sequences), ensure your use case supports UTF-8 byte encoding upstream, as some Base32 consumers may expect raw bytes rather than a UTF-8-encoded byte stream. Always validate the encoded output against your target system's decoder to confirm compatibility.

Use Cases

TOTP/2FA Secret Keys: Base32 is the standard encoding format for secret keys in Time-based One-Time Password (TOTP) systems like Google Authenticator and Authy — encode your raw secret bytes to share them as scannable or manually-enterable keys.
DNS and Hostname-Safe Tokens: When generating unique identifiers or tokens that must appear in DNS labels or subdomains, Base32 encoding ensures the output contains only alphanumeric characters that are safe and unambiguous in those contexts.
File and Path-Safe Data Encoding: Use Base32 to encode binary blobs, hashes, or UUIDs into strings that are safe for file names and directory paths across case-insensitive operating systems like Windows and macOS, avoiding conflicts caused by mixed-case Base64 output.
Human-Readable Token Generation: For activation codes, license keys, or verification tokens that users must type manually, Base32's limited alphabet (no 0, 1, 8, or 9) reduces transcription errors and makes validation more reliable in support workflows.

Related Tools