Base-2 to base-16
Binary to Hex Converter
Paste a binary number and convert it to hexadecimal using four-bit groups.
Binary to hexadecimal method
Hexadecimal is compact because one hex digit maps exactly to four binary bits. To convert binary to hex, pad the left side with zeros if needed, split the value into four-bit groups, and convert each group into a digit from 0 to F.
For example, 11111111 becomes 1111 1111. The first group maps to F, and the second group also maps to F, so the final answer is FF.
Common examples
1010equalsA.00101010equals2A.11111111equalsFF.
Padding and byte groups
When the number of bits is not divisible by four, pad the left side with zeroes before grouping. The padding does not change the value. For example, 101 becomes 0101, which maps to hexadecimal 5. For a full byte, keep eight bits so the two nibbles remain visible: 00101010 becomes 0010 1010, or 2A.
Hexadecimal is often used to make binary data shorter without losing bit-level meaning. One hex digit always represents four bits, so two hex digits represent one 8-bit byte. That makes this page useful for color values, memory examples, protocol fields, and code documentation where long strings of zeroes and ones are difficult to scan.
Number conversion is not text decoding
The answer 2A is a hexadecimal number, not the letters A and 2 in a message. If your binary groups represent character data, use Binary to Text instead. If you want to compare the numeric value in several formats, use the Number Base Converter.