エンコード
Base32
Base32(RFC 4648)エンコード・デコード — テキストとファイル、ブラウザ内で完結。
Base32, like Base64, encodes binary data as text, but uses an alphabet of only 32 characters (A-Z2-7) with no easily confused characters (0/O, 1/I). That's why Base32 shows up more often where a string might be typed by a person, not just copy-pasted.
How to use it
- Encode: enter text or pick a file to get a Base32 string per RFC 4648.
- Decode: paste a Base32 string to get the original text or file back.
- The alphabet is case-insensitive per the spec, though uppercase is the conventional way to write it.
Common uses
- Generating secrets for TOTP/2FA — authenticator apps use Base32 for the secret key specifically.
- Encoding identifiers or tokens a user might need to type by hand without confusing similar-looking characters.
- Working with formats that require Base32 instead of Base64 (some DNS records or case-insensitive file systems, for instance).
Things to keep in mind
Base32 grows data by roughly 60% (versus ~33% for Base64) — a trade-off for broader compatibility with case-insensitive systems and manual entry.
Base32hex is a separate variant of the same standard with a different alphabet (0-9A-V) that preserves sort order — it's incompatible with plain Base32.
よくある質問
Base32 と Base64 の違いは何ですか?
Base32はA-Zと2-7の32文字だけを使うエンコード方式で、大文字・小文字を区別しません。Base64より出力は長くなりますが(元データの約1.6倍)、ファイル名や音声で読み上げる識別子など、曖昧さを避けたい場面に向いています。
なぜ Base32 は Base64 より出力が長くなるのですか?
使える文字数が少ない分、1文字あたりに表現できる情報量が減るためです。Base32は5ビットずつ1文字に変換するので、元データよりおよそ60%サイズが大きくなります。
入力したデータは外部に送信されますか?
いいえ、エンコード・デコードの処理はすべてブラウザ内で行われ、テキストやファイルがサーバーに送られることはありません。
Base32のアルファベットに数字の0と1がないのはなぜですか?
これらの数字は読み取りや手入力の際に文字のOやI/lと混同しやすいため、RFC 4648では意図的にアルファベットから除外し、誤読の少ない文字だけを残しています。
Base32とBase32hexは何が違いますか?
Base32hex(同じRFC 4648で定義)はA-Z2-7の代わりに0-9A-Vというアルファベットを使い、エンコードされた文字列のソート順が元のバイト列のソート順と一致します。両者は互いに互換性がありません。