Base32 Encoder and Decoder
Base32 represents binary data using 32 characters, the ten digits 2-7 and the 26 uppercase letters, with no 0/O or 1/I to avoid reading mistakes. That makes it ideal for anything a human has to type or read aloud: two-factor TOTP secrets, voucher codes, case-insensitive identifiers. This tool encodes text to Base32 and decodes it back, following RFC 4648 with standard = padding.
How to encode or decode Base32
-
1
Paste the text to convert
Input is treated as bytes. UTF-8 is the default interpretation for text input.
-
2
Pick direction
Encode to turn raw bytes into a Base32 string; decode to recover the bytes.
-
3
Note the padding behavior
RFC 4648 pads the encoded output with `=` up to a multiple of 8 characters. The decoder accepts both padded and unpadded input.
-
4
Copy the result
Encoded output is uppercase, padded with `=` to a multiple of 8 characters.
The RFC 4648 alphabet
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 2 3 4 5 6 7
No 0, no 1, no 8, no 9. Each character encodes 5 bits (2^5 = 32), so 5 input bytes become 8 output characters.
Worked example
Encoding the ASCII string foo (bytes 0x66 0x6F 0x6F = 01100110 01101111 01101111):
- Chunk into 5-bit groups:
01100 11001 10111 10110 1111(last group padded) - Map to alphabet:
MZXW6 - Add
===padding to reach 8 characters:MZXW6===
Padding and length rules
| Input bytes | Output length | Padding |
|---|---|---|
| 1 | 8 | ====== |
| 2 | 8 | ==== |
| 3 | 8 | === |
| 4 | 8 | = |
| 5 | 8 | (none) |
Variants beyond RFC 4648
- Base32 Hex, Alphabet
0-9A-V, used by NSEC3 in DNSSEC. - Crockford’s Base32, Alphabet optimised for human typing; substitutes
O→0,I/L→1on decode. Used by ULIDs and some license keys.
This tool implements standard RFC 4648 only; use a dedicated converter for the variants above.
TOTP secrets
The otpauth:// URI format used by Google Authenticator and every modern 2FA app encodes the shared secret in Base32 without padding. When you scan a QR for “My Service”, the secret= parameter is a Base32 string. Decode it with this tool to inspect the raw bytes the HMAC uses.
Frequently Asked Questions
Base32 is case-insensitive and avoids look-alike characters, which matters for anything a human reads or types. Base64 is denser (fewer characters for the same bytes) but requires you to distinguish I from l and 0 from O, which fails in handwriting and small print.
RFC 4648 specifies padding for encoding. This tool always pads its encoded output with = to a multiple of 8 characters. Most real-world consumers (TOTP apps, ULID libraries, DNSSEC resolvers) accept unpadded input, and the decoder here accepts both padded and unpadded forms.
Standard Base32 has no 0, 1, 8 or 9 and is always uppercase. The decoder silently ignores any character outside the RFC 4648 alphabet, so lowercase or exotic input decodes to the wrong bytes. Normalize the input to uppercase letters A-Z and digits 2-7 before decoding.
Yes, the text travels to the page’s server so the result can be computed, and in the multi-step view the same text is also carried in the step link. It is not stored or logged.
Related Tools
A1Z26 Cipher Encoder
Encode text using the A1Z26 cipher (A=1, B=2, ... Z=26) or decode a number sequence back to letters, with customizable separator.
Base64 File Encoder
Encode any file (PDF, ZIP, image, executable) to Base64 text for embedding in JSON, email, YAML or data URIs. Runs locally, no upload.
Atbash Cipher Encoder
Encode or decode text with the Atbash cipher, a Hebrew substitution that maps A-Z to Z-A. Same operation encrypts and decrypts.
AES Encrypt / Decrypt
Encrypt and decrypt low-risk text with AES OpenSSL ciphers. The passphrase is hashed with SHA-256 and the Base64 output is IV plus ciphertext.
Caesar Cipher Encoder
Encrypt and decrypt text using the Caesar cipher. Any shift 1-25, supports ROT13 as a special case, preserves punctuation and case.
Cipher Identifier
Paste ciphertext and the identifier suggests likely encoding/cipher schemes: Base64, hex, binary, Morse, Caesar or substitution, JWT and common hashes.
Tool available in other languages
- Base32エンコーダー・デコーダー [JA]
- Encodeur et décodeur Base32 [FR]
- Base32-Encoder/Decoder [DE]
- Encoder dan Decoder Base32 [ID]
- Koder i dekoder Base32 [PL]
- Codificador y Decodificador Base32 [ES]
- Base32-kodare och avkodare [SV]
- Bộ mã hóa và giải mã Base32 [VI]
- Base32 编码器和解码器 [ZH]
- Base32 encoder en decoder [NL]
- Base32 인코더 및 디코더 [KO]
- Base32 Kodlayıcı ve Çözücü [TR]
- ตัวเข้ารหัสและถอดรหัส Base32 [TH]
- Codificador e Decodificador Base32 [PT]
- مشفر ومفكك Base32 [AR]
- Codificatore e Decodificatore Base32 [IT]
- Кодировщик и декодировщик Base32 [RU]