1001Ferramentas
🔀 Converters

Binary ↔ Hexadecimal Converter

Convert numbers between binary and hexadecimal without going through decimal. Shows nibble (4-bit) grouping.

Agrupamento em nibbles (4 bits):

From bits to hex without the decimal detour

You are staring at a memory dump, a register mask or a colour value and you need to get from 11010110 to D6 without doing it in your head or digging out the system calculator. The two fields here mirror each other: type on either side and the other updates on every keystroke, in both directions. Below them, the same binary is shown grouped four bits at a time.

The conversion is direct because each group of 4 bits, a nibble, maps to exactly one hex digit. Nothing is routed through decimal, so a 64, 128 or 256-bit string comes out right, while converters that parse to an integer break past 2 to the 53rd. When the binary does not fill a multiple of four, it is padded with leading zeros: 101 becomes 0101, which is 5.

An invalid character is not erased from the field, it is simply ignored in the maths. So if you typed a 2 in the binary box or a G in the hex box and the answer looks odd, that is why. It handles unsigned integers only: no minus sign, no decimal point, no two's complement interpretation, so for negatives convert the bit pattern you already have. All of it runs in the browser.

Frequently asked questions

Why do leading zeros show up in the binary?
Because every hex digit is always worth 4 bits. F becomes 1111 and 0F becomes 00001111. The nibble panel spells that grouping out so you can check bit by bit.
Does it handle negative numbers?
No. The string is read as an unsigned integer. If you work with two's complement, convert the bit pattern you already have and interpret the sign yourself.
Is there a length limit?
Not in practice. Because it converts nibble by nibble, a 256-bit value comes out exact. That is precisely where converters that go through decimal start returning wrong digits.

Related Tools