全球免费使用

进制转换器

使用任意大小的精确整数运算,在 2 到 36 进制之间转换整数。

你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。

输入

提示:按 Ctrl + Enter 运行

你的结果

结果将显示在这里。

下方的详细帮助目前仅提供英文版。

关于此工具

Programmers move between binary, octal, decimal and hexadecimal all the time: reading permissions, colour codes, bit masks and memory addresses. This converter handles any base from 2 to 36 using arbitrary-size integers, so very long numbers convert exactly without the rounding errors of ordinary floating-point maths.

Digits above 9 use letters, so base 16 uses 0–9 and a–f, and base 36 uses the whole alphabet.

使用方法

  1. Enter the whole number using digits valid for its base.
  2. Enter the base it is written in (2 to 36).
  3. Enter the base you want (2 to 36).
  4. Run the conversion and copy the result.

计算原理

The input is validated digit by digit against the source base, accumulated as a BigInt, and then written in the target base. Letters are case-insensitive on input and lowercase on output.

integer(base a) → integer(base b)

计算示例

A byte of all ones, 11111111 in base 2, converts to ff in base 16 (255 in decimal). A short base-36 code "zz" is 1295 in decimal. Entering 19 as an octal number is rejected because 9 is not an octal digit.

示例输入和结果

255 (10) = ff (16)

局限性

  • Non-negative integers only.
  • Bases 2 to 36.
  • No two’s-complement or signed binary interpretation.

最后更新:

常见问题

Can I convert negative numbers or fractions?

No. Only non-negative whole numbers are supported.

Why is my octal number rejected?

It contains a digit that does not exist in that base, such as 8 or 9 in base 8.

Should I include 0x or 0b prefixes?

No. Remove prefixes like 0x and 0b before converting.

故障排除

It shows an error.

Check for prefixes (0x), spaces, separators or digits invalid for the base.

I need uppercase hex.

Convert the result with the case converter.

I need a colour in RGB.

Use the HEX to RGB converter.

隐私 & 免费使用

我的输入会被保存吗?

你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。

这个工具免费吗?

是的。无需注册或付费。

在浏览器中处理

推荐下一步