Binary to Hex Converter
Enter a binary number to get its hexadecimal, decimal, and octal equivalents, along with the 4-bit grouping behind the result.
What is Binary to Hex Conversion?
Binary to hexadecimal conversion turns a base-2 number (using only 0 and 1) into its base-16 equivalent, which uses the digits 0-9 and the letters A-F for values 10-15. Programmers convert binary to hex constantly because hex is far more compact and readable than long strings of binary digits.
For example, the binary number 10101100 equals hex AC. Enter any binary number above to convert it and see the digit-by-digit breakdown. Want to learn how to convert binary to hex manually? See how to convert binary to hex for the full 4-bit grouping method, table, and worked examples. For arithmetic on binary numbers rather than conversion, see the Binary Calculator. For a broader look at how the two systems compare, see binary vs hexadecimal.
The 4-Bit Grouping Method
Hexadecimal is base 16, and 16 is 2⁴ — so one hex digit represents exactly four binary bits (a nibble). This makes converting binary to hex a matter of grouping, not long division: group the binary digits into sets of four starting from the right, pad the leftmost group with zeros if needed, then convert each group to its hex digit using the table below.
Worked example: convert 10101100 to hex
10101100 (group into 4-bit chunks from the right) 1010 1100 1010 = A 1100 = C 10101100₂ = AC₁₆
Binary ↔ hex reference table
| Binary (4 bits) | Hex | Decimal |
|---|---|---|
| 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 | A | 10 |
| 1011 | B | 11 |
| 1100 | C | 12 |
| 1101 | D | 13 |
| 1110 | E | 14 |
| 1111 | F | 15 |
If your binary number's length isn't a multiple of 4, pad it with leading zeros until it is — leading zeros never change the value. For the reverse operation, use the Hex to Binary Converter. Starting from a decimal number instead of binary? The Decimal to Hex Converter gets there directly, without converting through binary first. And once you have a hex result like the ones in the Decimal column above, the Hex to Decimal Converter confirms its base-10 value directly.
Common Binary to Hex Conversions
A quick reference for frequently seen binary numbers and their hexadecimal and decimal equivalents:
| Binary | Hex | Decimal |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 1 | 1 |
| 1010 | A | 10 |
| 1111 | F | 15 |
| 10000 | 10 | 16 |
| 101010 | 2A | 42 |
| 11111111 | FF | 255 |
| 100000000 | 100 | 256 |
| 10101100 | AC | 172 |
| 111111111111 | FFF | 4095 |
Where Binary to Hex Conversion Is Used
Converting binary to hex comes up whenever raw binary data needs a compact, human-readable form:
- Programming and debugging: reading memory dumps, stack traces, and bitwise operation results in a compact hex form instead of long binary strings.
- Memory addresses: pointers and register values are almost universally displayed in hex because each hex digit maps cleanly to 4 bits.
- Bitmasks: flags and permission bitmasks in code are often written and read as hex constants (e.g.
0xFF) rather than raw binary. - Low-level data representation: hash outputs, byte streams, and hex color codes (e.g.
#FF5733) are binary data shown in hex for readability. - Digital systems: hardware documentation and firmware registers use hex to describe binary signal states compactly.
Need the other direction with decimal instead of hex? Try the Decimal to Binary Converter.
Related Converters
Hex to Binary
Convert hexadecimal values back to binary — the reverse of this tool.
Binary to Decimal
Convert binary numbers to decimal for human-readable values.
Binary to Octal
Convert binary numbers to octal — commonly used for Unix file permissions.
Decimal to Binary
Convert decimal numbers to binary format for computer operations.
Binary Converter
Convert text, bytes, and binary values in one tool.
Binary Calculator
Add, subtract, multiply, and divide binary numbers.
Frequently Asked Questions
How do I convert binary to hex manually?
Group the binary digits into sets of four starting from the right, padding the leftmost group with zeros if needed, then convert each 4-bit group to its hex digit using the reference table above.
What is binary 11111111 in hex?
Binary 11111111 equals hex FF. Split it into two 4-bit groups — 1111 and 1111 — and each converts to F, giving FF (255 in decimal).
Why does one hex digit represent 4 binary bits?
Hexadecimal is base 16, and 2⁴ = 16, so a single hex digit can express every possible value of a 4-bit group (0-15) with no remainder. That exact fit is what makes binary-to-hex conversion a grouping exercise rather than a division problem.
What if my binary number's length isn't a multiple of 4?
Add leading zeros to the left until the length is a multiple of 4. For example, 101 becomes 0101, which converts to hex 5 — leading zeros don't change the value.
Can this converter handle very large binary numbers accurately?
Yes. Conversion uses JavaScript's BigInt arithmetic rather than parseInt() or Number, so the result stays exact even for binary numbers longer than the 53-bit range where regular JavaScript numbers start to lose precision.
What happens if I enter an invalid character?
The converter shows an error message and does not produce a result, since only the digits 0 and 1 are valid in a binary number.
Related Tools
You might also find these tools useful
Base Converter
Convert whole numbers between binary, octal, decimal, hex, and custom bases 2-36 in one hub.
Binary Converter
Convert text, UTF-8 bytes, and binary values without focusing only on readable messages.
Binary Calculator
Add, subtract, multiply, and divide binary numbers for math and computer science exercises.
Binary to Decimal
Turn base-2 numbers into decimal values for programming, networking, and study notes.
Decimal to Binary
Convert everyday base-10 numbers into binary with clear fixed-width output.
Decimal to HEX
Translate decimal values into compact hexadecimal notation for technical references.