Base32 Encoder / Decoder

Encode and decode text to RFC 4648 base32, right in your browser.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

A Base32 encoder and decoder that converts text to RFC 4648 base32 and back instantly in your browser. It is built for developers working with authenticator secrets, DNS records, Tor addresses, or any system that needs binary data carried safely through text-only channels. Type on the left, read the result on the right — encode or decode, with optional padding, a live hex view of the underlying bytes, and one-click copy.

How it works

Base32 takes a stream of bytes and re-groups it into chunks of 5 bits. Each 5-bit chunk (a value from 0 to 31) is mapped to one character of the RFC 4648 alphabet — the uppercase letters A to Z followed by the digits 2 to 7. Because 5 bits and 8 bits share a least common multiple of 40, the encoder works in 40-bit blocks: every 5 input bytes become exactly 8 output characters. When the final block is short, the leftover bits are left-aligned into one more character and, if padding is enabled, trailing = characters round the length up to a multiple of 8.

Decoding reverses the process exactly. Each character is looked up to recover its 5-bit value, the bits are concatenated, and every full group of 8 bits becomes one output byte. This tool normalises input to uppercase, strips whitespace and trailing = padding, and rejects any character outside the base32 alphabet with a clear error pointing at the offending position — so a single mistyped character never silently produces garbage. All of it runs on TextEncoder/TextDecoder and plain bit-shifting, with no network calls.

Example

Encoding the text Hi works like this: the bytes are 0x48 0x69, or 01001000 01101001 in binary. Re-grouped into 5-bit chunks that becomes 01001 00001 10100 1, padded to 01001 00001 10100 10000, which maps to values 9 1 20 16 — the characters JBUQ. Padding to a full 8-character block gives JBUQ====.

Input textBase32 (padded)Base32 (no padding)
HiJBUQ====JBUQ
fooMZXW6===MZXW6
foobarMZXW6YTBOI======MZXW6YTBOI

Switch to Decode, paste any of those base32 strings, and the original text returns exactly. Everything is computed locally — nothing you enter is ever uploaded.

Ad placeholder (rectangle)