Binary to Hex Converter
Turn long strings of ones and zeros into short, readable hexadecimal. Convert one binary number of any length, or a whole list separated by spaces or lines, and choose capitals, 0x prefixes and how the results are separated.
How to Convert Binary to Hex
Quick answer: paste one or more binary numbers; the hex values appear below straight away.
-
1
Paste binary numbers
One or many, any length.
-
2
Choose the format
Case, 0x and separators.
-
3
Check the result
Each number is converted.
-
4
Copy or download
Use the hex anywhere.
What You Get
How Binary Becomes Hex
Each hex digit stands for exactly four binary digits, so converting is a matter of grouping: starting from the right, binary is split into groups of four, and each group becomes one hex digit from 0 to F. 1111 is F, 1010 is A and 0101 is 5, so 11111010 0101 becomes FA5. Because the grouping is exact, there is no rounding or loss, and numbers of any length convert perfectly.
One Number or Many
Separate several binary numbers with spaces, commas or new lines and each is converted on its own, in the same order. Choose Join together to merge the results into one continuous hex string, which is useful when the binary is a sequence of bytes. 0b prefixes and underscores used as digit separators in code are ignored.
Example
11111111 becomes FF, 1010 becomes A and 0b110101101011 becomes D6B. A 33-digit number such as 1 followed by 32 zeros becomes 100000000, showing how much shorter hex is. To go the other way, use Hex to Binary.
Who Converts Binary to Hex?
Computer science students checking homework, programmers reading bit masks, flags and register values, electronics hobbyists working with microcontrollers, network engineers handling addresses and masks, and anyone who finds long rows of ones and zeros hard to read. Hex makes the same value four times shorter and much easier to compare.
Step by Step
Paste or type your binary numbers. Pick capital or small letters to match your notes or code, add 0x if the value goes into program code, and choose whether results stay separate or join together. Copy the hex or download it as a .txt file. If a number contains a digit other than 0 or 1, a clear message shows which one.
Good to Know
Leading zeros do not change a number's value, so 00001010 and 1010 both give A. If you need fixed-width output, such as two hex digits per byte, convert byte by byte and join the results. This tool converts numbers; to see the hex bytes of written text, use Text to Hex, and to read binary as text, Binary to Text.
Quick Reference
0000 = 0, 0001 = 1, 0010 = 2, 0011 = 3, 0100 = 4, 0101 = 5, 0110 = 6, 0111 = 7, 1000 = 8, 1001 = 9, 1010 = A, 1011 = B, 1100 = C, 1101 = D, 1110 = E and 1111 = F. Learning these sixteen pairs lets you convert any binary number by hand, four digits at a time.
More Examples
More examples: 1 is 1, 10 is 2, 100 is 4 and 1000 is 8, while 10000 is 10 in hex because sixteen is the base. A full byte of ones, 11111111, is FF, and two bytes, 1111111111111111, become FFFF. Colour channels are bytes too: 11111111 00000000 00000000 joined together gives FF0000, the hex code for pure red. Bit masks often look like 00001111, which becomes F, keeping the low four bits. Joining a list of eight-bit bytes produces the same hex string you would see in a file viewer.
Private, Free and Instant
The converter is free and handles numbers of any length. There is no sign-up, no limit and nothing to install. The conversion runs inside your browser, so your text and data are never uploaded, logged or stored. The result updates as you type or paste, and you can open a text file from your device and download the result as a new .txt file. It works on Windows, Mac, Linux, Chromebooks, iPhone and Android, in any modern browser.
Binary to Hex: Shorter Notation for Bit Patterns
Long strings of bits are hard to read. Hexadecimal packs four bits into one digit, making 11111111 into FF.
How to convert
Split the binary string into groups of four from the right, padding the left with zeros, and replace each group with its hex digit. 1011 0110 is B6.
Reverse the process with hex to binary.
Frequently Asked Questions
Questions about binary to hex