Binary to Hex Converter

Convert a binary (base 2) number to hexadecimal (base 16) instantly. As an example, 11111111 = FF. It runs entirely in your browser.

BaseThis number
Binary (base 2)
Octal (base 8)
Decimal (base 10)
Hexadecimal (base 16)

How to convert binary to hexadecimal

The simplest route from binary to hexadecimal goes through decimal: convert the binary value to decimal, then convert that to hexadecimal.

11111111 (binary) = 255 (decimal) = FF (hexadecimal)

Worked example: 11111111 in hexadecimal

Reading 11111111 as base 2: 1 × 27 (= 128) + 1 × 26 (= 64) + 1 × 25 (= 32) + 1 × 24 (= 16) + 1 × 23 (= 8) + 1 × 22 (= 4) + 1 × 21 (= 2) + 1 × 20 (= 1) = 255 in decimal, which is FF in hexadecimal.

More binary-to-hexadecimal examples: 1010 = A, 10000 = 10, 1000000 = 40.

Binary, octal, decimal & hexadecimal reference table

DecimalBinaryOctalHex
1111
21022
410044
81000108
10101012A
15111117F
16100002010
321000004020
64100000010040
100110010014464
1281000000020080
25511111111377FF
256100000000400100
1024100000000002000400

About binary and hexadecimal

Binary: Binary is base-2: every digit (bit) is 0 or 1. It is how computers store and process all data at the hardware level.

Hexadecimal: Hexadecimal is base-16, using 0–9 then A–F. Each hex digit is exactly four bits, so it is a compact way to write bytes — used for colours (#FF8800), memory addresses and MAC addresses.

Frequently asked questions

What is 11111111 binary in hexadecimal?
11111111 in binary (base 2) equals FF in hexadecimal (base 16), which is 255 in decimal.
How do I convert binary to hexadecimal by hand?
Convert binary to decimal first (11111111 = 255), then convert that decimal value to hexadecimal (255 = FF). The tool above does both steps for you.
Is this exact for very large numbers?
Yes. The converter uses big-integer (BigInt) arithmetic in your browser, so even very long binary values convert to hexadecimal with no rounding or precision loss.
Which characters are valid in binary?
Base-2 binary uses the digits 0 and 1. Spaces, underscores and an optional 0x/0b/0o prefix are ignored; any other character is flagged as invalid.

Related number conversions

See all number-base conversions →