Binary to Hex Converter
Convert any binary value to hexadecimal instantly by grouping bits into 4-digit chunks — the reverse of the hex-to-binary nibble lookup.
How to Convert Binary to Hex
Binary to hex is the reverse of the hex-to-binary nibble lookup: split the binary digits into groups of 4, counting from the right, then convert each group to its matching hex digit.
If the leftmost group has fewer than 4 digits, pad it with leading zeros first — that doesn't change the value, it just completes the group so it can be looked up the same way as the rest.
Binary to Hex Example, Step by Step
11110000 = F0
11110000 (binary) = F0 (hex)
1111 0000 | | F 0
| Step | Description | Result |
|---|---|---|
| Group from the right | 11110000 splits into 1111 and 0000 | 1111 | 0000 |
| Convert first group | 1111 is the nibble for hex F | F |
| Convert second group | 0000 is the nibble for hex 0 | 0 |
| Combine | read the groups left to right | F0 |
This binary value split evenly into two full groups. When it doesn't — see the padding example below — the leftmost group needs leading zeros added first.
Padding a Partial Leftmost Group
When the total bit count isn't a multiple of 4, the leftmost group is short — complete it with leading zeros before converting.
| Binary input | Padded | Hex result |
|---|---|---|
| 101 | 0101 | 5 |
| 11 | 0011 | 3 |
| 101101 | 0101 1101 | 5D |
| 1 | 0001 | 1 |
Where Binary to Hex Actually Comes Up
Formatting a MAC Address
A MAC address is 48 raw bits under the hood — converting that binary to hex is what produces the familiar colon-separated hex pairs network tools display.
48 bits -> 00:1A:2B:3C:4D:5E
Reading a Register's Raw Bit Pattern
Hardware and embedded debugging tools often show a register's contents as raw binary — converting to hex makes the value far easier to compare against documentation, which is almost always written in hex.
11110000 -> 0xF0
Shortening a Long Bit String for Notes
When you're documenting a protocol or file format by hand, writing a 32-bit value as 8 hex digits instead of 32 binary digits keeps notes readable without losing any information.
32 bits -> 8 hex digits
Common Mistakes When Converting Binary to Hex
- Grouping from the left instead of the right, which misaligns every group after the first.
- Forgetting to pad the leftmost group with leading zeros when the bit count isn't a multiple of 4.
- Miscounting bits in a long string and creating a group with 3 or 5 digits instead of 4.
- Converting through decimal as an unnecessary detour, the same trap as hex to binary.
Why Use This Calculator Instead of Doing It by Hand
- Groups and pads the bits for you, so there's no manual counting
- Runs entirely in your browser — nothing you type gets sent anywhere
- Handles any length input, from a single nibble to a full 64-bit value
- Gives decimal and octal for the same value at once, no extra lookups
Frequently Asked Questions
How do you convert binary to hex manually?
Split the binary digits into groups of 4, starting from the right. Convert each group to its hex digit using the nibble lookup table, then read the hex digits left to right in the same order as the groups.
Why do you group binary digits into 4s?
Because one hex digit represents exactly 4 bits (since 16 is 2^4). Grouping by 4 lines each chunk up with exactly one hex digit, with no remainder to handle.
What if my binary number's length isn't a multiple of 4?
Pad the leftmost group with leading zeros until it has 4 digits. 101 becomes 0101 for conversion purposes, which is the hex digit 5 — the padding doesn't change the value, only how it's grouped.
Is binary to hex easier than binary to decimal?
Yes, considerably — binary to hex is a direct grouping and lookup with no arithmetic, while binary to decimal requires summing powers of 2 for every bit that's set.
How does this relate to bytes?
A byte is 8 bits, which splits cleanly into two groups of 4 — so every byte converts to exactly 2 hex digits, which is why hex is the standard shorthand for byte values in programming.
Can I convert IP addresses or MAC addresses this way?
Yes for MAC addresses, which are just 6 bytes (48 bits) grouped as 12 hex digits. IP addresses are usually converted per-octet (each of the 4 decimal numbers becomes up to 2 hex digits) rather than as one long binary string.
Is "bin to hex" the same conversion as binary to hex?
Yes — "bin" is just shorthand for binary. Both describe grouping bits into nibbles and looking up the matching hex digit for each group.
How do I convert binary to hex in code?
Most languages parse a binary string directly and format it as hex in one step, like JavaScript's parseInt("11110000", 2).toString(16) or Python's hex(int("11110000", 2)), both returning "f0".