🔍

首页Home › 编码与加密Encoding & Crypto

🔢 文字转任意进制(ASCII 转 2–36 进制编码)Convert ASCII to Arbitrary Base

把文字的每个字符(或 UTF-8 字节)转换成 2 到 36 之间任意进制的数字:二进制、八进制、十进制、十六进制、三进制、Base36……可设置固定位数补零、大写字母、分隔符和 0b / 0o / 0x 前缀,也能把这些数字反向解码回文字。中文等非 ASCII 字符可按 UTF-8 字节或 Unicode 码点处理。适合编码练习、CTF 解题和计算机课教学,数据在本地处理。Convert every character of a text (or every UTF-8 byte) into a number in any base from 2 to 36: binary, octal, decimal, hex, ternary, base 36 and more. Choose fixed-width zero padding, uppercase letters, the separator and 0b / 0o / 0x prefixes, and decode such numbers back into text. Chinese and other non-ASCII characters can be handled as UTF-8 bytes or as Unicode code points. Handy for encoding practice, CTF puzzles and computing classes. Processed locally.

使用说明与常见问题How-to & FAQ

「文字转任意进制(ASCII 转 2–36 进制编码)」是什么?What is the Convert ASCII to Arbitrary Base tool?

把文字的每个字符(或 UTF-8 字节)转换成 2 到 36 之间任意进制的数字:二进制、八进制、十进制、十六进制、三进制、Base36……可设置固定位数补零、大写字母、分隔符和 0b / 0o / 0x 前缀,也能把这些数字反向解码回文字。中文等非 ASCII 字符可按 UTF-8 字节或 Unicode 码点处理。适合编码练习、CTF 解题和计算机课教学,数据在本地处理。Convert every character of a text (or every UTF-8 byte) into a number in any base from 2 to 36: binary, octal, decimal, hex, ternary, base 36 and more. Choose fixed-width zero padding, uppercase letters, the separator and 0b / 0o / 0x prefixes, and decode such numbers back into text. Chinese and other non-ASCII characters can be handled as UTF-8 bytes or as Unicode code points. Handy for encoding practice, CTF puzzles and computing classes. Processed locally.

如何使用「文字转任意进制(ASCII 转 2–36 进制编码)」?How do I use the Convert ASCII to Arbitrary Base tool?

在「文字转任意进制(ASCII 转 2–36 进制编码)」中,把内容粘贴或输入到上方输入框,按需设置「方向」、「进制(2–36)」、「单位」、「分隔符」,结果会实时显示在下方,点击「复制结果」即可复制。例如输入「Hi」,得到「01001000 01101001」。In the Convert ASCII to Arbitrary Base: Paste or type into the input box, adjust "Direction", "Base (2–36)", "Unit", "Separator"; the result appears below instantly — click "Copy result" to copy it. Example: "Hi" → "01001000 01101001".

为什么二进制都是 8 位?Why is binary always 8 digits?

勾选“固定位数”时,每个数会补零到能表示最大值所需的位数:按 UTF-8 字节时最大值是 255,所以二进制 8 位、八进制 3 位、十六进制 2 位、三进制 6 位;按 Unicode 码点时最大值是 10FFFF(十六进制 6 位)。固定位数让结果整齐,也让没有分隔符的数字串可以被正确解码。With Fixed width ticked, each number is zero-padded to the digits needed for the largest possible value. For UTF-8 bytes that's 255: 8 binary digits, 3 octal, 2 hex, 6 in base 3. For code points it's 10FFFF (6 hex digits). Fixed width keeps things tidy and lets a run of numbers with no separator be decoded correctly.

中文怎么转换?How is Chinese converted?

ASCII 只包含 128 个英文字符和符号,中文、表情等需要选择单位:“UTF-8 字节”把每个字符拆成 1–4 个字节分别转换(一个汉字通常是 3 个字节),与网页和文件中实际存储的数据一致;“Unicode 码点”把每个字符转成一个数(如“中”= 4E2D)。解码时要选择相同的单位和进制。ASCII only covers 128 English characters and symbols, so for Chinese, emoji and the like choose a unit. UTF-8 bytes splits each character into the 1–4 bytes it's stored as (a Chinese character is usually 3) and converts each, matching what's actually stored in web pages and files. Code points turns each character into one number (the Chinese character for 'middle' is 4E2D). Use the same unit and base when decoding.

36 进制用什么数字?Which digits does base 36 use?

超过 10 进制时依次用字母 a–z 表示 10–35,所以 16 进制用 0–9 和 a–f,36 进制用 0–9 和全部 26 个字母。“大写字母”只影响输出的样式,解码时大小写都可以。Above base 10, the letters a–z stand for 10–35, so hex uses 0–9 and a–f and base 36 uses 0–9 plus all 26 letters. Uppercase only changes how the output looks; decoding accepts either case.

编码和加密有什么区别?Is encoding the same as encryption?

编码(如 Base64、URL 编码)可直接还原,不提供保密性;加密需要密钥。「文字转任意进制(ASCII 转 2–36 进制编码)」的处理全部在本地完成。No. Encoding (Base64, URL…) is reversible by anyone; encryption needs a key. The Convert ASCII to Arbitrary Base works fully offline in your browser.

「文字转任意进制(ASCII 转 2–36 进制编码)」免费吗?需要注册吗?Is the Convert ASCII to Arbitrary Base free? Do I need an account?

「文字转任意进制(ASCII 转 2–36 进制编码)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Convert ASCII to Arbitrary Base is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.

相关工具Related tools

0️⃣ 文本二进制转换Text to Binary Converter🔢 进制转换Number Base Converter🔗 文本转 Data URI(data: 链接生成与解析)Convert ASCII to Data URI🔀 翻转 ASCII 位(按位取反、异或、反转位序)Flip ASCII Bits🔡 二进制转 UTF-8 文本(解码二进制字节)Convert Binary to UTF-8🔠 UTF-8 文本转二进制(查看 UTF-8 字节)Convert UTF-8 to Binary🎲 随机二进制数生成器(指定位数、不重复、可设种子)Generate Random Binary Values🖼️ 二进制转图片(0 和 1 画成像素图)Convert Binary to Image🧬 Unicode 转 Base64Convert Unicode to Base6401 Unicode 转二进制Convert Unicode to Binary#️⃣ Unicode 转十六进制Convert Unicode to Hex8️⃣ Unicode 转八进制Convert Unicode to Octal

← 全部工具All tools