go-supertools
Developer & Data Tools

Base32 Encoder & Decoder

Encode text to Base32 or decode Base32, with the standard or extended-hex alphabet.

Runs in your browser Your input never leaves your device.

0 characters | 0 words

Report a problem with this tool

About this tool

Base32 writes bytes with 32 characters (A to Z and 2 to 7), which are safe in file names, case-insensitive systems and typed codes. It is the format of TOTP authenticator secrets and is used in some identifiers and DNS-safe encodings. Choose encode or decode. Encoding turns your text, as UTF-8 bytes, into Base32 with = padding at the end, which you can switch off. The extended hex alphabet (0-9 and A-V) keeps the sort order of the data and is used in some DNS records. Decoding ignores spaces and line breaks, accepts lower case and missing padding, and reports the first character that does not belong. If the decoded bytes are not valid UTF-8 text, for example a binary secret, the result shows them as hex instead of garbled characters. The encoder and decoder were compared with Python's base64.b32encode and b32hexencode on 133 byte strings of different lengths, including empty and all-zero ones. Everything runs in your browser; nothing is uploaded.

How to use it

  1. Choose encode or decode.
  2. Paste your text or Base32.
  3. Pick the alphabet and padding if needed.
  4. Copy the result.

Common problems

It says the length is not valid
Base32 text comes in blocks of 8 characters; a final block of 1, 3 or 6 characters cannot be produced by any data, so part of the text is missing.
The decoded result shows hex
The bytes are not text in UTF-8, which is normal for secrets and binary data. The hex shows the exact bytes.
My TOTP secret does not decode to text
TOTP secrets are random bytes, not text. Use the TOTP generator tool to make codes from the Base32 secret.