Base32 Encoder / Decoder
Encode text to Base32 or decode Base32 strings back to text — pure JS RFC 4648 implementation.
How to use this tool
- 1Click Encode or Decode to choose the direction.
- 2Paste your input into the left textarea.
- 3Click the Encode or Decode button.
- 4Copy the result from the right output panel.
About Base32 Encoder / Decoder
This Base32 encoder/decoder implements RFC 4648-style text Base32 in pure JavaScript so you can round-trip strings in the browser.
Some protocols prefer Base32 over Base64 for case-insensitive channels. A local codec avoids pasting tokens into unknown sites.
Click Encode or Decode to choose the direction. Paste your input into the left textarea. Click the Encode or Decode button. Copy the result from the right output panel. Processing stays in your browser.
Use it for TOTP-related experiments and protocol demos. Confirm alphabet/padding variants.
Padding and alphabet variants differ. Case folding may be required. Invalid alphabets should error visibly.
Close the tab when you finish so sensitive input is not left in page memory.
Code examples
Python
import base64
encoded = base64.b32encode(b"hello world").decode()
decoded = base64.b32decode(encoded).decode()JavaScript
// Base32 alphabet
const CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
function base32Encode(input) {
let bits = 0, value = 0, output = "";
for (const byte of new TextEncoder().encode(input)) {
value = (value << 8) | byte;
bits += 8;
while (bits >= 5) {
output += CHARS[(value >>> (bits - 5)) & 31];
bits -= 5;
}
}
if (bits > 0) output += CHARS[(value << (5 - bits)) & 31];
return output.padEnd(Math.ceil(output.length / 8) * 8, "=");
}Frequently asked questions
Different tools use different definitions and parsers, so small gaps are common. Base32 Encoder / Decoder applies browser-native parsers and encoders appropriate to the job with one consistent browser-side rule set. Hidden characters, stricter syntax, or a different tokenizer usually explain the mismatch. Reduce the input to a minimal sample, then add pieces back until the difference appears. Match the rule your destination actually enforces.
Treat the error as a signal that this environment is stricter or configured differently. Browser APIs reject malformed structures early instead of guessing. Convert to a boring intermediate when it helps—plain UTF-8 text, PNG, WAV, or an unlocked PDF—then retry. If the intermediate works, the original encoding was the problem. Keep that minimal sample for the next regression check.
Runtimes disagree even when feature names match. Locales, parser strictness, codec builds, and library versions differ between your browser and CI. Export the exact bytes from Base32 Encoder / Decoder, hash them, and compare in the pipeline. Align normalization steps so both systems see the same input. Use the browser result as a reference artifact, then make CI match it.
Desktop apps win on deep feature sets, batch farms, and specialized hardware paths. Base32 Encoder / Decoder wins on zero install, private local processing, and speed for the everyday job on this page. Choose desktop software for multi-hour editorial work or exotic edge formats. Choose this tool when you need a correct result quickly without uploading. Many people do a quick pass here first, then open the heavy suite only if an edge case demands it.
Prefer Base32 Encoder / Decoder whenever the input is personal, unpublished, customer-owned, or under NDA, because the core transform stays in your browser via browser-native parsers and encoders appropriate to the job. Cloud services can still help for formats your browser truly cannot decode, but you must trust their retention policy. Strip secrets before any upload. Privacy is usually the reason to stay local—not a longer marketing checklist.
Start from the best original input you still have. Change only what the destination requires. Prefer lossless intermediates when you must convert twice. Because the tool is local, iterate in small steps: tweak one setting, re-run, compare. Spot-check a short sample before batching anything important.
No account is required for normal use. The core base32 converter transform runs in your browser on your device using browser-native parsers and encoders appropriate to the job. You get on-screen output, a copy action, or a download without a mandatory ToolBrigade upload for that step. Keep your browser updated. A few lookup utilities may call public reference APIs for live fields only—they still do not need your private documents.
Lighter text, code, calculator, and many image jobs work on modern phones. Large video encodes and huge PDFs are happier on a plugged-in laptop with more RAM. Fully client-side flows can continue offline once scripts are cached; live lookups still need network. If a run seems stuck, try a smaller sample, free memory by closing tabs, and confirm the input is not truncated. Prove the path on a short fixture before blaming the algorithm.