Security Tools

Base32 Encoder / Decoder

This free Base32 Encoder converts text to Base32 and decodes Base32 back to text using the standard RFC 4648 alphabet (A-Z and 2-7), padding output with equals signs to a multiple of eight characters. Text is encoded as UTF-8, decoding accepts lowercase and missing padding, and everything runs in your browser.

Runs in your browser. Your files and text never leave your device - nothing is uploaded.

Free Base32 Encoder and Decoder

The Tools Kit’s free Base32 Encoder converts text to Base32 and decodes Base32 back to text. It uses the standard RFC 4648 alphabet of uppercase letters A to Z and digits 2 to 7, and pads the output with equals signs to a multiple of eight characters, so the result matches what other Base32 libraries and command-line tools produce.

Everything runs in your browser. Text is turned into UTF-8 bytes before encoding, so accented letters and emoji survive the round trip, and nothing you type is uploaded. If you need the more compact, case-sensitive format instead, the Base64 encoder works the same way.

How to Encode and Decode Base32

  1. 1

    Enter your text

    Type or paste the text you want to convert into the Text box. Any Unicode text works, including accented letters and emoji, because it is converted to UTF-8 bytes first.

  2. 2

    Click Encode

    Press Encode to fill the Base32 box with the result, written in the RFC 4648 alphabet (A-Z and 2-7) and padded with equals signs to a multiple of eight characters.

  3. 3

    Copy the Base32 string

    Click Copy Base32 to put the encoded string on your clipboard, ready to paste into a config file, URL or script.

  4. 4

    Decode Base32 back to text

    To go the other way, paste a Base32 string into the Base32 box and press Decode. Lowercase input and missing padding are accepted, and the decoded text appears in the Text box.

If decoding fails, a red message names the exact character that is not valid Base32, such as a space, a hyphen or the digit 1, so you know what to remove.

How Base32 Encoding Works

A computer stores text as bytes of 8 bits. Base32 regroups those bits into chunks of 5, and each 5-bit chunk (a number from 0 to 31) is written as one character: 0 to 25 become the letters A to Z, and 26 to 31 become the digits 2 to 7. Because 5 bytes hold 40 bits, they fill exactly 8 Base32 characters. If you want to see the raw bits of a byte for yourself, the binary converter shows any number in binary, decimal and hex.

Here is the word Hi worked through by hand. Its two bytes are 72 and 105, or 01001000 01101001 in binary. Split into 5-bit groups that is 01001 00001 10100 1; the last group is filled with zeros to 10000. Those values are 9, 1, 20 and 16, which map to J, B, U and Q. Four characters fall short of a block of eight, so four equals signs are added and the result is JBUQ====.

Base32 Padding and Output Length

Every 5 bytes of input produce 8 characters, so Base32 output is 60 percent larger than the input. When the input length is not a multiple of 5 bytes, the final block is padded with equals signs. The RFC 4648 test vectors, all reproduced exactly by this tool, show the pattern:

InputBytesBase32 outputPadding
f1MY======6
fo2MZXQ====4
foo3MZXW6===3
foob4MZXW6YQ=1
fooba5MZXW6YTB0
foobar6MZXW6YTBOI======6

Bytes, not characters, decide the length. The word café has four characters but five UTF-8 bytes, because é takes two, so it encodes to the full block MNQWNQ5J. When decoding, the tool strips trailing equals signs before reading, so an unpadded string decodes to the same text.

Base32 vs Base64: Which Should You Use?

Base64 is more compact, adding about 33 percent instead of 60, which is why it is the usual choice for email attachments, data URIs and API payloads; you can reverse it with the Base64 decoder. Its weakness is that it mixes upper and lowercase letters and uses + and /, which break in case-insensitive systems and have to be escaped in links, as the URL encoder shows.

Base32 trades size for robustness. Its output is case-insensitive, contains no punctuation apart from padding, and avoids the look-alike digits 0, 1 and 8, so it is easier to read aloud, type by hand or use in file names and DNS labels. That is why two-factor authentication apps share setup keys in Base32. Keep in mind that neither format is encryption: both can be reversed by anyone, so use a keyed hash such as the HMAC generator when you need to verify data.

Base32 and 2FA Secret Keys

The setup key shown beneath a two-factor QR code, such as JBSWY3DPEHPK3PXP, is Base32. It encodes random bytes rather than words, so decoding it here produces partly unreadable text with replacement characters; that is expected, not an error. To check that a secret works, paste it into the TOTP generator, which turns it into the same six-digit codes an authenticator app shows. Setup keys are often displayed in groups of four with spaces, which this decoder rejects, so remove the spaces first.

Common uses

  • Encoding a value for a case-insensitive system such as a DNS label or file name
  • Creating an identifier that is easy to read over the phone or type by hand
  • Checking what a Base32 string from a config file or log contains
  • Comparing your own Base32 implementation against the RFC 4648 test vectors
  • Learning how binary-to-text encodings group bits into characters

Need a random secret to encode in the first place? The password generator creates one with a cryptographically secure random source. For more encoding, hashing and token utilities, browse all security tools.

Base32 terms explained

TermWhat it means here
Base32A binary-to-text encoding that writes data with 32 symbols, 5 bits per character
RFC 4648The IETF standard that defines Base16, Base32 and Base64; this tool uses its standard Base32 alphabet
AlphabetThe 32 output symbols: the letters A to Z (values 0-25) and the digits 2 to 7 (values 26-31)
PaddingTrailing equals signs that round the output up to a multiple of eight characters
QuantumA 5-byte (40-bit) block of input that maps exactly onto 8 Base32 characters
UTF-8The byte encoding used for text before it is converted, so one character may become several bytes

Frequently Asked Questions

Reviewed by Raja Jahangir · Last reviewed: October 7, 2026

How do you encode text to Base32?

To encode text to Base32, paste the text and click Encode; the output uses the RFC 4648 alphabet of A-Z and 2-7, padded with equals signs to a multiple of eight characters, so "Hi" becomes JBUQ====. Paste Base32 into the lower box and click Decode to reverse it. Encoding and decoding both run in the browser.

Why does Base32 output end with equals signs?

Base32 turns every 5 bytes of input into 8 output characters. When the input length is not a multiple of 5, the final group is padded with equals signs so the output stays a multiple of eight characters. Two bytes, for instance, produce four characters plus four padding signs. Decoders strip the padding before reading.

Sources and standards