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

Binary11111111
Octal377
Decimal255
Hexadecimalff

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

相关问答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.

Further reading

觉得好用?Found it useful?