Base32 Encode Online: RFC 4648 Base32 and Base32hex
Encode text or a file as Base32 in your browser, with or without padding, or switch to Base32hex. Decoding ignores spaces and case and names the first bad character. Nothing is uploaded.
0 characters, 0 bytes
0 characters, 0 bytes
About the Base32 encoder
This page encodes text or a file as Base32 and decodes Base32 back, following RFC 4648. Base32 writes every 5 bytes as 8 characters drawn from the capital letters A to Z and the digits 2 to 7. Because it uses a single letter case and leaves out 0, 1 and 8, a Base32 value can be read aloud, typed by hand or used in a case-insensitive place without errors creeping in. Everything runs in your browser: your text and files never leave your device, and nothing is uploaded.
How to encode Base32
Steps
- Type or paste text, or press Choose file for a file of up to 50 MB. Text is encoded as UTF-8.
- Read the Base32 in the output and press Copy.
- Turn Padding off if the receiving system does not expect the trailing
=signs. - Select Base32hex for the extended-hex alphabet, or Decode to turn Base32 back into text.
Where Base32 is used
Authenticator secrets
The secret behind a TOTP or HOTP code, the one in the QR code you scan into an authenticator app, is almost always Base32. Most apps accept it without padding and in any letter case.
Names and identifiers
Tor onion addresses, some file-sharing hashes and many generated identifiers use Base32 because it fits host names and file names, which ignore case.
DNS
DNSSEC NSEC3 records use Base32hex, the RFC 4648 section 7 variant with the alphabet 0 to 9 and A to V. Its encoded values sort in the same order as the underlying bytes.
Padding and decoding
Standard Base32 pads the output to a multiple of 8 characters with =, so foobar becomes MZXW6YTBOI======. Without padding it is MZXW6YTBOI. The decoder accepts both forms, ignores spaces, line breaks and letter case, and names the first character that is not in the alphabet with its position. An input whose last group cannot hold whole bytes is reported as incomplete rather than silently truncated.
Base32 is not encryption: anyone can decode it, so treat an encoded secret exactly as you would the secret itself.
Base32 is 60 percent larger than the data it holds, against 33 percent for Base64. When size matters more than readability, use the Base64 Encoder. For Bitcoin-style Base58 or plain hex, use the full Base32, Base58 and hex encoder, and to inspect each character as bytes, try Text to Hex.
Open-source credits
- The Base32 and Base32hex codecs are written for this site and follow RFC 4648 sections 6 and 7. The tests assert every test vector from section 10 of the RFC.
- No third-party library is used for Base32.