Binary to Hex Converter
Paste a binary number to get its hexadecimal value. Bits are grouped in fours so you can check each digit.
- Binary · Octal · Decimal · Hex
- Step-by-step working
- Two’s complement
- Big numbers
What is a binary to hex converter?
Binary to hex conversion groups the bits in fours from the right and replaces each group with one hexadecimal digit. 1011 1110 becomes B E, so the hex value is BE. It is a compact way to write long binary values, which is why hex is used for memory, colours and machine code. This converter pads the leftmost group with zeros, handles any length, and can show the decimal and octal values too.
How to convert binary to hex
- Type a binary number in the Binary box. Prefixes, spaces and underscores are ignored.
- Read the hex result instantly. Binary, octal, decimal, hex and a custom base update together.
- Scroll to “How to convert binary to hex” for the step-by-step working with your number.
- For negative numbers, tick Signed and choose a bit width to see the two’s complement form. Then copy any result.
Number base cheat sheet
- Binary (base 2) uses 0–1, octal (base 8) uses 0–7, decimal (base 10) uses 0–9 and hexadecimal (base 16) uses 0–9 then A–F for 10–15.
- One hex digit is exactly 4 bits (a nibble), so hex and binary convert digit by digit: F = 1111, A = 1010.
- Common prefixes: 0b for binary, 0o for octal and 0x for hex. They are optional here.
- In two’s complement, the top bit is the sign: 1111 1111 is −1 as a signed 8-bit number but 255 unsigned.
Why use this binary to hex converter
- Converts as you typeNo Convert button: edit either side and the other updates immediately.
- Shows the workingStep-by-step place values or repeated division for the conversion you choose, ideal for homework and exams.
- Any size, signed or unsignedArbitrary-precision integers, plus two’s complement for 8, 16, 32 and 64-bit values.
- Private by designEverything is calculated in your browser. Nothing you type is sent to a server or saved.
Common uses
- Writing constants. Turn bit masks into compact hex literals.
- Machine code. Convert opcodes and instruction bits.
- Homework. Check nibble grouping with the working shown.
- Data sheets. Translate register bit layouts into hex values.
Related converters: number base converter, hex to decimal, decimal to hex, binary to decimal, decimal to binary, hex to binary, binary calculator, hex calculator. Browse all encoding tools.
Example: binary to hex
10111110 (binary) 1011 → B 1110 → E = BE (hex) = 190 (decimal)
What to expect from the result
Whole numbers only: fractional values such as 0.1 are not converted. Very long numbers are converted exactly, but the step-by-step working is shown only for numbers up to 24 digits.
Binary to Hex Converter questions
How do you convert binary to hex?
Split the binary into groups of 4 bits from the right, pad the left group with zeros, and replace each group with its hex digit (1010 = A, 1111 = F).
What is 11111111 in hex?
FF.
What is 1010 1010 in hex?
AA, which is 170 in decimal.
What if the number of bits is not a multiple of 4?
Add zeros on the left. 101 becomes 0101, which is 5.
Can I convert binary with spaces?
Yes. Spaces and underscores are ignored, so 1011_1110 and 1011 1110 both work.