Number base converter
Edit any base and the others update live. Supports 0b/0o/0x prefixes, digit grouping, two's complement, and a nibble breakdown for binary→hex.
Binary
Prefix: 0b · grouped by 4 bits
Octal
Prefix: 0o · grouped by 3 digits
Decimal
Hexadecimal
Prefix: 0x · grouped by 2 digits
Two's complement
For negative numbers — select bit width:
Two's complement applies to negative values only.
Binary → hex (nibble map)
Each hex digit is 4 bits (a nibble). Group binary in fours, convert each group:
| Binary (8 bits) | Hex |
|---|---|
About this tool
Computers store numbers in binary. Humans often read hex because it is compact — two hex digits map to one byte (8 bits). Octal was common on older Unix systems (file permissions still use it).
This converter uses BigInt so large integers work. Negative numbers show a two's complement representation at the bit width you pick — how signed integers are stored in memory.