BASE CONVERTER
Convert number bases, bin / oct / dec / hex instantly.
Enter a number and its base to instantly get binary, octal, decimal and hexadecimal results — big integers supported.
Results
Everything runs locally in your browser
Solution animation · expand by place value
Enter a valid number
What does this tool do?
It quickly converts numbers between binary, octal, decimal and hexadecimal — useful for programming, networking and learning. Built on BigInt, so huge integers convert exactly.
FAQ
Are negatives and fractions supported?
Integers of any size (including negatives) are supported. Fractional base conversion is rarely needed and not yet supported.
Is my data uploaded?
No. Conversion happens entirely in your browser.
示例与注意事项Example & notes
一个例子A worked example
把 0xFF 与 255 互换:选「十六进制 → 十进制」得到 255,切到二进制则是 11111111。Swap 0xFF and 255: choose hex → decimal to get 255, switch to binary for 11111111.
注意事项Things to watch
- 支持 2–36 进制;进制再高也没有公认的字符集,因此不做支持。Bases 2–36 are supported; beyond that there is no agreed character set.
- 大数用字符串精确转换,不做浮点近似,因此不会出现末位错位。Large numbers convert exactly as strings with no floating-point rounding.
- 负数若按补码理解,需要先确定位宽(8 位与 32 位结果不同)。Two’s-complement negatives depend on bit width — 8-bit and 32-bit results differ.
相关问答More Q&A
为什么二进制负数那么长?Why is a negative binary number so long?
那是按固定位宽输出的补码表示,最高位为符号位,所以会用整段 1 填充。That is two’s complement at a fixed bit width: the leading bit is the sign, so it is padded with ones.
支持小数吗?Does it handle decimals?
支持有限位小数;无限循环小数会截断到可读位数并提示,不保证完全精确。Finite fractional digits are supported; repeating fractions are truncated to a readable length with a note.