🧮 进制与编码转换Base & Encoding

在十进制、十六进制、二进制、八进制之间互转(基于 BigInt,支持超大整数),并把文本编码为 Base64、Base32、Base58 与 Base85(Ascii85)。选择输入进制或「自动」识别(0x→十六进制、0b→二进制、0o→八进制)。Convert between decimal, hexadecimal, binary and octal (BigInt, supports huge integers), and encode text to Base64, Base32, Base58 and Base85 (Ascii85). Pick the input base or let it auto-detect (0x→hex, 0b→binary, 0o→octal).

① 输入① Input

数字进制按所选进制解析输入;Base64 / Base32 始终对原始文本编码。Number bases parse the input in the chosen base; Base64 / Base32 always encode the raw text.

② 方向 / 进制② Direction / base

编码方向:数字按输入进制解析并显示四种进制,文本同时编码为 Base64/Base32/Base58/Base85;解码方向:把输入当作编码串,逐一还原为文本。URL-safe Base64 用 - _ 替代 + / 并去掉末尾 =。Encode: numbers are parsed in the chosen base and shown in four bases; text is also encoded to Base64/Base32/Base58/Base85. Decode: the input is treated as an encoded string and decoded back to text for each codec. URL-safe Base64 uses - _ instead of + / and drops trailing =.

③ 转换结果③ Result

使用说明How to use

怎么用How to use
  1. 输入数字或文本Enter a number or text
  2. 在 2/8/10/16 进制间转换,或做 Base64/Base32 编解码Convert between bases 2/8/10/16, or Base64/32
  3. 查看各进制表示Review all representations

示例:255 → 十六进制 FFExample: 255 → hex FF

全程在你的浏览器本地完成,文本不会上传服务器。Runs entirely in your browser; your text is never uploaded.

输入一个数字(如 255 或 0xFF)查看它在四种进制下的表示;输入任意文本(如 Hello)可得到其 Base64、Base32、Base58 与 Base85 编码。每行结果右侧的「复制」按钮可单独复制,也可用「复制全部 / 下载全部」一次性获取。大整数不会溢出(基于 BigInt)。Enter a number (e.g. 255 or 0xFF) to see it in four bases; enter any text (e.g. Hello) to get its Base64, Base32, Base58 and Base85. Use each row’s Copy button, or Copy all / Download to grab everything. Large integers never overflow (BigInt).

Base64 / Base32 / Base58 / Base85 用途各异:Base64 是最通用的二进制→文本编码(邮件附件、JWT、CSS data URI);Base32 只用 A-Z2-7、无歧义字符,适合人工抄写与受限系统;Base58 去掉了易混淆的 0/O/I/l,广泛用于比特币等加密货币地址;Base85(Ascii85)每 4 字节只膨胀到 5 字符(Base64 是 3→4),压缩率更高,用于 PostScript/PDF 等场景。本工具四种均支持编码与解码。The encodings serve different purposes: Base64 is the most universal binary→text encoding (email attachments, JWT, CSS data URIs); Base32 uses only A–Z 2–7 with no ambiguous chars, good for human transcription and restricted systems; Base58 drops confusing 0/O/I/l, widely used for cryptocurrency addresses; Base85 (Ascii85) expands 4 bytes to only 5 chars (vs 3→4 for Base64) — higher density, used in PostScript/PDF. This tool encodes and decodes all four.