Base32 Encode / Decode
Encode UTF-8 text to canonical RFC 4648 Base32 or decode padded and unpadded Base32 back to strict UTF-8.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Choose Encode for UTF-8 text or Decode for an RFC 4648 Base32 value.
- 2.Paste the input and review the derived output or a specific validation error.
- 3.Copy the output or swap direction to verify a round trip.
About Base32 Encode / Decode
Base32 Encode / Decode converts plain UTF-8 text with the standard alphabet defined in RFC 4648 section 6. Choose Encode to turn text into uppercase Base32 using A through Z and digits 2 through 7, or choose Decode to recover text from a Base32 value. Conversion happens entirely in the current browser tab and nothing is uploaded.
Encoding first turns the JavaScript string into UTF-8 bytes with the browser TextEncoder. It reads those bytes as a stream of five-bit groups, maps each group to the RFC alphabet, fills the final partial group with zero bits, and appends equals signs until the encoded length is a multiple of eight. Empty input remains empty. This produces the canonical padded form used in the RFC test vectors.
Decoding accepts uppercase or lowercase letters, removes pasted whitespace, and permits either exact canonical padding or an unpadded form with a valid length. It rejects punctuation, digits outside 2 through 7, equals signs in the middle, impossible data lengths, incorrect padding counts, and non-zero unused trailing bits. Those checks prevent a malformed value from being silently interpreted as different bytes.
The decoded byte array is passed to a fatal UTF-8 decoder. If the bytes are not valid UTF-8, the tool reports that limitation instead of replacing invalid sequences with a placeholder character. This page is therefore a text converter, not a general binary file decoder. Binary payloads may be valid Base32 while still being invalid for this text-only output.
Seven official RFC vectors cover the empty string and the progressive inputs f, fo, foo, foob, fooba, and foobar. The alphabet anchor separately verifies that indexes zero, twenty-five, twenty-six, and thirty-one map to A, Z, 2, and 7. Additional tests cover lowercase input, inserted whitespace, multilingual UTF-8, emoji, invalid padding, and non-canonical trailing bits.
The Swap direction control moves a successful output into the opposite input, making an encode-then-decode round trip easy to inspect. Copy output uses the browser clipboard only after the user selects it. A clipboard denial never changes the conversion result. Results are derived from the current input and mode, so an old output cannot remain attached to newer text.
Base32 increases size because eight encoded characters represent five input bytes, before any padding. It is an encoding rather than encryption, hashing, signing, or compression. Anyone with the text can decode it, and it provides no secrecy, authenticity, integrity protection, or password storage. Do not treat an encoded secret as protected.
Whitespace tolerance is limited to decoding convenience. Removed line breaks and spaces are not part of the decoded data, while whitespace inside the original text is preserved because it was encoded as UTF-8 bytes. Uppercase and lowercase encoded letters are treated equivalently, but the encoder always emits uppercase canonical output. Padding is displayed explicitly so users can compare the result with protocol examples and standard-library implementations.
This implementation intentionally supports standard RFC 4648 Base32 only. It does not implement Base32hex, Crockford Base32, z-base-32, TOTP secret provisioning rules, case-folding digits such as zero and one, arbitrary alphabets, streaming files, or checksum variants. Use a protocol-specific implementation when another alphabet or security rule is required.
Methodology & sources
Encode UTF-8 bytes into five-bit RFC 4648 alphabet indexes, zero-fill the final group, and add canonical equals padding to a multiple of eight. Decode after case normalization and whitespace removal; validate alphabet, length, padding, and zero trailing bits; rebuild bytes; then use fatal UTF-8 decoding. Verify the seven published RFC text vectors plus alphabet anchors and malformed-input cases.
Frequently asked questions
- Is Base32 encryption?
- No. It is a reversible binary-to-text encoding with no secrecy or integrity protection.
- Can I decode lowercase or unpadded input?
- Yes. Lowercase is normalized, pasted whitespace is ignored, and structurally valid unpadded input is accepted.
- Why can valid Base32 fail as text?
- The decoded bytes may be binary rather than valid UTF-8; this focused tool outputs strict UTF-8 text only.
- Does the text leave my browser?
- No. UTF-8 conversion, bit grouping, validation, and clipboard preparation happen locally.
Related tools
- Base64 Encode / DecodeEncode or decode Base64 instantly with full UTF-8 support — emoji and accents work, all in your browser.
- Binary To TextConvert text to binary and binary back to text instantly, with full Unicode (UTF-8) support and everything running locally in your browser.
- Text to Binary ConverterEncode text as visible 8-bit UTF-8 binary bytes or decode strictly formatted binary back to valid Unicode text.
- Hex to Text ConverterParse hexadecimal bytes with explicit separator and 0x-prefix rules, then decode only complete valid UTF-8 without silent replacement.
- ASCII ConverterConvert standard 7-bit ASCII text to decimal codes or decode decimal codes back to exact ASCII characters locally.
- Caesar Cipher DecoderEncode or decode a classic Caesar shift while preserving case, punctuation, numbers, and non-ASCII text.