Skip to content

How Base Converter works

Type a number in any base, with or without a 0x, 0b or 0o prefix, and see it in binary, octal, decimal, hex and a base you choose. Pick a width to see the two's complement pattern, then try a bitwise operation against a second value.

Uses BigInt for exact arithmetic at any size, masks results to 8, 16, 32 or 64 bits, and reads signed values from the top bit.

Questions

Does it handle numbers larger than 64 bits?
Yes. Conversion uses BigInt, so size is not limited. Two's complement and bitwise operations are shown at 8, 16, 32 or 64 bits.
How do prefixes work?
0x means hex, 0b binary and 0o octal. A prefix overrides the input base menu.
What is two's complement?
It is how most computers store signed integers. The top bit marks a negative number, and -1 is all ones, so -1 in 8 bits is 11111111, or 0xFF.
Is anything sent to a server?
No. Everything runs in your browser.

More Text & Data tools

All the tools · How to check that nothing is sent

Binary, Hex and Decimal Base Converter | Only in the Tab