Binary to Hex
Convert binary numbers to hexadecimal instantly, turning base 2 into the compact base 16 form. No signup. Ideal for programmers, students and digital work.
Share on Social Media:
A binary to hex converter turns binary numbers (0s and 1s) into hexadecimal — the short, readable base-16 form computers use for colours, memory addresses and data. Paste your binary, click Convert to Hex, and you get the hex equivalent. It is free, needs no signup, and works on any device.
Every 4 binary digits become exactly 1 hex digit, so the hex result is 4 times shorter than the binary you entered. The tool outputs lowercase hex letters (a–f) with no 0x prefix — for example, 01001000 01101001 becomes 48 69.
On this page
- How to Convert Binary to Hex Step by Step
- What Binary and Hexadecimal Are
- Binary vs Hexadecimal
- Who Converts Binary to Hex
- Pro Tips for Working With Binary and Hex
- Common Binary to Hex Mistakes to Avoid
- Related Tools You May Need Next
- Frequently Asked Questions
How to Convert Binary to Hex Step by Step
- Enter the binary number. Type or paste your binary into the input box. It must contain only zeros and ones — any other digit or letter is not valid binary.
- Upload a file instead (optional). If your binary is saved in a
.txtfile, use the Upload File button to load it instead of pasting. - Click Convert to Hex. Press the Convert to Hex button. The tool sends your binary to the server and converts it — each group of binary digits becomes one hex digit.
- Read the hex result. The hexadecimal equivalent appears below the input, in lowercase letters (
a–f) with no0xprefix. Space-separated binary groups stay separate in the result. - Copy or save the result. Use Copy to Clipboard to copy the hex, or Save as TXT to download it as a
binary-to-hex.txtfile.
Worked example 1 — the word "Hi". The letters H and i are 72 and 105 in decimal. In binary that is 01001000 01101001. Split each 8-bit group into 4-bit halves and read off the hex: 0100 1000 = 48, and 0110 1001 = 69. The tool returns 48 69. Add the exclamation mark (00100001) and you get 48 69 21.
Worked example 2 — one long number. Take 110101101011. Group it from the right in fours: 1101 0110 1011. Each group is one hex digit: 1101 = d, 0110 = 6, 1011 = b. The answer is d6b — 12 binary digits become just 3 hex digits.
Worked example 3 — a short number. Enter 101. It has only 3 digits, so the tool pads it on the left to 0101, which is 5. You do not need to add the leading zero yourself.

What Binary and Hexadecimal Are
Binary is the base-2 number system, using only the digits 0 and 1. It is the fundamental language of computers: every bit of data is ultimately a string of zeros and ones. Hexadecimal, or hex, is the base-16 system, using the digits 0–9 and the letters a–f for the values 10–15. Hex is computing's shorthand for binary — the same value, written far more compactly.
The two systems pair so neatly because 16 is a power of 2 (2⁴ = 16). That means each hex digit corresponds to exactly 4 binary digits — no fractions, no rounding, no awkward leftovers. Converting binary to hex is just grouping the bits in fours, from the right, and translating each group into its single hex digit.
| Binary (4 bits) | Hex | Decimal | Binary (4 bits) | Hex | Decimal |
|---|---|---|---|---|---|
0000 | 0 | 0 | 1000 | 8 | 8 |
0001 | 1 | 1 | 1001 | 9 | 9 |
0010 | 2 | 2 | 1010 | a | 10 |
0011 | 3 | 3 | 1011 | b | 11 |
0100 | 4 | 4 | 1100 | c | 12 |
0101 | 5 | 5 | 1101 | d | 13 |
0110 | 6 | 6 | 1110 | e | 14 |
0111 | 7 | 7 | 1111 | f | 15 |
4 bits = 1 hex digit. Because 16 = 2⁴, every group of 4 binary digits maps to exactly one hexadecimal digit. That is why the hex form is always exactly 4 times shorter than the binary — 8 bits become 2 hex digits, 16 bits become 4, and so on.
This compactness is why hex shows up everywhere in computing: colour codes such as #ff5733, memory addresses, byte values in programming, and data dumps. Reading ff is far easier than reading 11111111, and both mean the same value — 255.

Binary vs Hexadecimal
| Aspect | Binary | Hexadecimal |
|---|---|---|
| Base | Base 2 | Base 16 |
| Digits | 0 and 1 only | 0–9 and a–f |
| Length | Long strings of 0s and 1s | Exactly 4 times shorter |
| Example | 11111111 | ff (same value: 255) |
| Main use | How computers store data | How humans read and write that data |
| Where you see it | Bit patterns, binary files | Colour codes, memory addresses, code |
Who Converts Binary to Hex
Programmers A developer converts binary values to hex to read and write byte data, memory addresses and bit flags in a compact form in their code.
Students learning number systems A student studying binary and hexadecimal converts between them to see how 4 bits map to one hex digit and why the two systems fit together so neatly.
Digital electronics workers Someone working with hardware converts binary values to hex to display and manage bit patterns, registers and addresses in the shorter hex form.
People working with colours and data A designer or data worker converts binary to hex when a colour, byte value or data dump needs to be read in the compact hex form — for example, turning a binary colour value into a hex colour code.
Anyone converting binary to hex A person who has a binary number and wants its compact hexadecimal form converts it, condensing the lengthy binary into readable hex.

Pro Tips for Working With Binary and Hex
Group from the right, in fours. When converting by hand, split the binary into groups of 4 starting from the right-hand end, not the left. Grouping from the left gives the wrong answer whenever the length is not a multiple of 4.
Use spaces to keep bytes separate. The tool converts each space-separated group on its own and keeps the spaces in the result — 01001000 01101001 gives 48 69, while the same digits without spaces give 4869. Spaces are the way to keep bytes readable.
Split very long binary into groups. Converting a long binary string? Break it into space-separated groups (for example 8-bit bytes). Each group converts separately, and the hex stays easy to read.
Expect lowercase letters. This tool outputs lowercase hex (a–f), with no 0x prefix. If your code needs uppercase or a prefix, add it after copying — the value is the same either way.
Upload a .txt file for long input. If your binary is already saved in a text file, use the Upload File button instead of pasting a long string by hand — it avoids copy-paste mistakes.
Convert to decimal too if needed. To get the everyday decimal value as well, our Binary to Decimal tool converts binary to decimal, and the Base Converter handles any base.
Common Binary to Hex Mistakes to Avoid
Entering digits other than 0 and 1. Binary uses only 0 and 1. If your input contains a 2–9, a letter, or a 0b prefix, it is not valid binary and the tool will not return a result. Check the input and try again with only zeros and ones.
Grouping from the left instead of the right. Each hex digit stands for a group of 4 bits counted from the right. Grouping from the left misaligns every group when the length is not a multiple of 4 — for example, 101101011 must be grouped from the right as 0001 0110 1011 (16b), not from the left as 1011 0101 1.
Being confused by letters in the hex. Hex uses the letters a–f for the values 10–15, so a result like ff or d6b is normal and correct — not an error.
Adding a 0x prefix to the input. The tool takes plain binary only. Typing 0b1010 will not convert — enter 1010 on its own.
Confusing hex with decimal. The result is hexadecimal (base 16), not decimal. ff means 255, not 99 — if you need the decimal value, use the Binary to Decimal tool.
Related Tools You May Need Next
To go back the other way, use the Hex to Binary tool. For the decimal value, try the Binary to Decimal tool, or Decimal to Hex to convert from decimal instead. The Base Converter handles conversions between any bases. For text, the Binary to Text tool turns binary into readable characters, and Text to Binary does the reverse.
Frequently Asked Questions
How do I convert binary to hex?
Paste your binary number (only 0s and 1s) into the input box and click Convert to Hex. The tool groups the bits in fours and translates each group into one hex digit — for example, 01001000 01101001 becomes 48 69.
What is hexadecimal?
Hexadecimal, or hex, is the base-16 number system, using the digits 0–9 and the letters a–f for the values 10–15. It is computing's compact shorthand for binary, because each hex digit stands for exactly 4 binary digits.
Why do binary and hex pair so neatly?
Because 16 is a power of 2 (2⁴ = 16), each hex digit corresponds to exactly one group of 4 binary digits. The conversion is clean and mechanical: group the bits in fours from the right and translate each group.
Why is the hex output lowercase?
This tool outputs lowercase hex letters (a–f) with no 0x prefix — for example, 10101010 gives aa, not AA. The value is identical either way; if your code needs uppercase, change the case after copying.
What happens if I enter a number other than 0 or 1?
The tool will not return a result. Binary contains only 0s and 1s, so remove any other digit, letter, space inside a group, or 0b prefix and try again.
Do I need spaces between binary groups?
No — but spaces change the result's shape. Without spaces, the whole string converts as one number (0100100001101001 → 4869). With spaces, each group converts separately (01001000 01101001 → 48 69). Use spaces when you want to keep bytes separate and readable.
How do I convert binary to hex by hand?
Split the binary into groups of 4 digits starting from the right. If the leftmost group is short, pad it with leading zeros (for example, 101 becomes 0101). Then translate each group using the table above: 0000 = 0, 1010 = a, 1111 = f, and so on.
Can I upload a file instead of pasting?
Yes. Click Upload File and choose a .txt file containing your binary. The tool reads the file and converts it the same way as pasted input.
Can I save or copy the result?
Yes. Copy to Clipboard copies the hex result, and Save as TXT downloads it as a binary-to-hex.txt file.
Is the binary to hex converter free?
Yes, it is completely free with no account and nothing to download or install. Paste your binary, click Convert to Hex, and copy or save the result.