Skip to content
UniKit

Base32 converter

Encode text to Base32 or decode Base32 back to text following RFC 4648, with the standard 32-character alphabet, optional = padding, lowercase input and full Unicode support.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Result

What this tool does

  • Carry data through channels that only allow uppercase letters and digits: TOTP two-factor secrets, `otpauth://` links and some DNS or domain-verification records all use Base32.
  • Check a Base32 secret someone gave you by decoding it back to text, so a misread 0/O or 1/I does not slip through.
  • Debug “invalid secret” errors by comparing the padded and unpadded forms — plenty of servers accept only one of them.
  • Make hand-copied Base32 easier to read by switching to lowercase or dropping the padding.

Example

Input

foobar

Output

MZXW6YTBOI======

This is the standard test vector from RFC 4648. Base32 encodes every 5 bytes into 8 characters and pads to a multiple of 8 with =, so 6 bytes of foobar end with six equals signs.

Frequently asked questions

Should I use Base32 or Base64?

Base32 uses only 26 letters plus 2–7 — 32 characters total — and is about 60% longer than the input, but it is case-insensitive and avoids `+` and `/`, so it survives hand-copying and dictation. Base64 is only a third longer but mixes cases and special characters. Pick Base32 when a human has to retype it, Base64 when size matters.

Why do 0 and 1 cause a decoding error?

The RFC 4648 alphabet is A–Z plus 2–7, so the digits 0, 1, 8 and 9 are not valid and trigger “This is not valid Base32”. That usually means the string was copied from Base64 or a plain number, or the other side uses a custom alphabet such as Crockford Base32.

Can the = padding be omitted?

When decoding, yes. The tool ignores whitespace, normalises to uppercase and accepts input with no padding at all; you only get “The = padding does not match the data length” when padding is present but inconsistent with the data. When encoding, the “Include = padding” switch decides.

Does it handle non-English text?

Yes. Text is UTF-8 encoded before conversion, so 中文 becomes `4S4K3ZUWQ4======`. If the decoded bytes are not valid UTF-8 — a binary file, say — you get a clear “not valid UTF-8 text” error instead of mojibake.

Is anything sent to a server?

No. Encoding and decoding run entirely in your browser with JavaScript, there are no network requests, and secrets are never logged. It works offline.

Keywords:base32base 32rfc 4648encodedecode编码解码base32 转换padding填充

Related tools