Binary to Hex Converter
Convert binary numbers to hexadecimal online. Supports continuous and space-separated binary input with step-by-step breakdown and copy-to-clipboard.
About
Binary (base-2) is the native language of digital hardware. Hexadecimal (base-16) compresses every 4 binary digits into a single hex digit, reducing transcription errors by a factor of four. Manual conversion is error-prone: a single misread bit in a 32-bit address flips the hex result entirely, which can corrupt memory maps, MAC addresses, or color codes. This tool validates input, pads to the nearest nibble boundary, and maps each 4-bit group to its hex equivalent. It assumes unsigned, big-endian bit ordering. For signed integers or IEEE 754 floats, interpret the raw hex output according to the relevant standard.
Formulas
Each group of 4 binary digits (a nibble) maps to exactly one hexadecimal digit. The binary string is first left-padded with zeros so its length is a multiple of 4.
Where H is the resulting hex digit (0 - F), and b3 through b0 are individual bit values (0 or 1). The full hex output is the concatenation of all nibble mappings from most-significant to least-significant.
Reference Data
| Binary Nibble | Decimal | Hex |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0010 | 2 | 2 |
| 0011 | 3 | 3 |
| 0100 | 4 | 4 |
| 0101 | 5 | 5 |
| 0110 | 6 | 6 |
| 0111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | 10 | A |
| 1011 | 11 | B |
| 1100 | 12 | C |
| 1101 | 13 | D |
| 1110 | 14 | E |
| 1111 | 15 | F |