BASE32 / 58 / 85
Multi-base encoding, Base32 / 58 / 85 both ways.
Convert between text and Base32, Base58 and Base85. Base32 is common for keys and DNSSEC, Base58 for Bitcoin addresses (no ambiguous chars), Base85 (Ascii85) for PDF / Git binary patches. All computed locally with standard algorithms.
Most tools process data locally; see this page for details
What is this?
These encodings represent binary bytes as printable characters: Base32 uses 32 chars in 5-bit groups (RFC 4648); Base58 uses a 58-char alphabet without 0/O/I/l via big-integer conversion, preserving leading zeros; Base85 (Ascii85) encodes every 4 bytes as 5 chars with z for all-zero groups — more compact than Base64.
FAQ
How is Base58 different from Base64?
Base58 drops ambiguous chars (0, O, I, l) and the +, / and = padding, converts as a big integer and preserves leading zero bytes — better for human transcription (e.g. Bitcoin addresses). Base64 uses fixed 6-bit groups and is more general.
Decode errors or garbled output?
Make sure the encoding and direction are correct and the characters belong to that alphabet. Base85 decoding ignores whitespace and accepts <~ ~> wrappers; if the bytes are not valid UTF-8, decoded text may show replacement chars.
Is anything uploaded?
No. Everything runs in your browser; nothing is sent to a server.
示例与注意事项Example & notes
一个例子A worked example
把 hello 编成 Base32 得到 NBSWY3DP(每 8 个字符一组、不足用 = 补齐);把方向切到「编码 → 文本」再粘回去,hello 又回来了。Encoding hello as Base32 gives NBSWY3DP (groups of 8, padded with =). Switch the direction to Encoded → Text, paste it back, and hello returns.
注意事项Things to watch
- Base32 按 RFC 4648 输出大写 A–Z 与 2–7,解码时小写会自动转成大写、空白会被忽略;但 0、1、8、9 根本不在字母表里,粘错就会直接失败。Base32 follows RFC 4648 with uppercase A–Z and 2–7. Decoding upper-cases lowercase input and ignores spaces, but 0, 1, 8 and 9 are simply not in the alphabet, so a typo fails immediately.
- Base58 字母表大小写敏感,并刻意删掉了 0、O、I、l 四个易混字符;手抄地址时把 l 写成 1 是最常见的解码失败原因。The Base58 alphabet is case-sensitive and drops the ambiguous 0, O, I and l. Copying l as 1 by hand is the most common reason a string fails to decode.
- Base85(Ascii85)里的 z 代表 4 个全零字节,输出可能含 ! 与 ~ 等符号;勾上「用 <~ ~> 包裹」就是 Adobe 变体,解码时两种写法都能识别。In Base85 (Ascii85) the letter z stands for four zero bytes and the output can contain characters such as ! and ~. Tick the <~ ~> wrapper for the Adobe variant; the decoder accepts either form.
- 这三种都是编码而不是加密,拿到结果的人都能还原原文;中文按 UTF-8 计算,一个汉字占 3 字节,编码后会明显变长。These are encodings, not encryption: anyone with the output can recover the original. Text is treated as UTF-8, so one Chinese character takes 3 bytes and the encoded string is noticeably longer.
相关问答More Q&A
Base32、Base58、Base85 我该选哪个?Which one should I use: Base32, Base58 or Base85?
看对方要求:要标准兼容选 Base32(RFC 4648,密钥与 DNS TXT 记录常见);要人工抄写选 Base58(比特币地址风格);要在有限篇幅里塞更多内容选 Base85(Git 二进制补丁、Adobe 格式)。Pick by context: Base32 (RFC 4648) for standard compatibility such as keys and DNS TXT records; Base58 when a human has to copy it, Bitcoin-address style; Base85 when you need the most content per character, e.g. Git binary patches and Adobe files.
解码后是乱码或问号,说明什么?What does garbled output after decoding mean?
多半是原内容不是合法 UTF-8 字节(比如本来就是二进制文件),或者字母表与方向选错了:先核对用的是 Base32 还是 Base58 字母表,再确认方向是「编码 → 文本」。Garbled output usually means the source bytes were not valid UTF-8 (raw binary, for instance), or the alphabet and direction were wrong. Check that you picked the right alphabet and that the direction is Encoded → Text.