Guide
Shortening binary to hexadecimal with groups of four bits
Sixteen is two to the fourth power, so one hexadecimal digit stands for exactly four bits. That tidy relationship is the reason hex appears in memory dumps, colour codes, hash values and debugger output: it is binary made short enough to read without losing the bit boundaries. This converter does the grouping and shows it.
The grouping rule
Split the bit string into groups of four, starting at the binary point and working outward. If the leftmost group is short, add zeros in front of it. If the last group after the point is short, add zeros after it. Each group of four is then a number from 0 to 15, which is written as 0–9 or A–F. The string 101101 becomes 0010 1101, which is 2D.
What the working shows
With the working switched on, the page prints the bits in their groups, an arrow, and the digit for each. Seeing the zeros that were added is useful, because it explains why the hex answer can look longer than you expect from the number of bits. The panel underneath lists the same value in octal, decimal and base 36, so you can cross-check against whichever base your exercise or document uses.
Options
Choose upper-case or lower-case letters to match the style of your code base. The prefix switch adds 0x for use in source code, and digit grouping inserts spaces in long results. Because spaces, underscores and a 0b prefix in the input are ignored, you can paste a dump with a space between each byte and read the whole thing as a single number.
Edge cases
An odd number of bits is common: a 7-bit ASCII code such as 1000001 is padded to 0100 0001 and becomes 41. A single leading zero group disappears from the result, so 00001111 gives F and not 0F. Pad the answer yourself if a format needs two digits per byte. Fractions are grouped from the point to the right, so 0.1 is padded to 0.1000 and gives 0.8.
Negative numbers keep their minus sign. They are not converted to a complement, so −1 is shown as −1 and not as FF.
A worked example
The Sample button loads 11010110.101. The integer bits split into 1101 and 0110, which are D and 6. The fraction bits 101 are padded on the right to 1010, which is A. The answer is D6.A, and in decimal the same number is 214.625. For a quick sanity check, D is 13 and 13 × 16 + 6 is 214; the .A is 10/16, which is 0.625.
Limits
The page converts values, not formats. It does not know whether your bits are a colour, a floating-point number or a network address, and it adds no padding to reach a register width. For floating-point layouts use the IEEE 754 converter, and for byte order problems use the endian converter. Very long inputs work, but the working lines grow with them, so turn the working off if you only need the answer.
Related tools
- Hex to Binary expands each digit back into four bits.
- Binary to Octal uses groups of three bits for the same idea in base 8.
- Endian Converter swaps byte order when a hex value is read the wrong way round.
- Bitmask Calculator builds and tests flag masks.
Checked against the current version of the Binary to Hex on .

