radixflip

Binary to Hex Converter

Type a binary number and the hexadecimal value appears instantly as you type — this page has no Convert button because the conversion runs on every keystroke. The 4-bit grouping for your exact number is shown underneath.

Convert Binary to Hexadecimal

Only 0–1. Type here — the answer appears instantly, no button to press.
Type a number in any box above.

How to convert binary to hex

  1. Group the bits into 4s, from the right. If the leftmost group has fewer than 4 bits, pad it with zeros at the front.
  2. Turn each group into one hex digit. 0000 = 0, 0001 = 1, all the way to 1111 = F. Letters A–F stand for the values 10–15.
  3. Write the digits in order. That sequence is the hexadecimal number.

The loop, visually

StartSplit the bits from the rightinto groups of 4Take the next groupReplace it withits hex digitMore groups left?Join the hex digitsin orderThat's your hex number Yes No

Example: 101010 → groups from the right: 10 | 1010 → pad the first group: 0010 | 1010 → 0010 = 2, 1010 = A → join: 2A₁₆

Work from the right, and pad the leftmost group with zeros if it comes up short — every group of 4 bits is exactly one hex digit.

Binary groups to hex digits

BinaryHexBinaryHexBinaryHexBinaryHex
0000001004100081100C
0001101015100191101D
00102011061010A1110E
00113011171011B1111F

Worked example: 101010₂ = 2A₁₆

Group from the right: 10 and 1010. Pad the first group to 4 bits: 0010 = 2. The second group, 1010, is A. Joined: 2A.

Worked example: 11111111₂ = FF₁₆

Two full groups: 1111 and 1111. Each is F, so the answer is FF — the value 255, the largest a byte can hold.

Binary to hex conversion table (0–255)

Every byte value in decimal, binary, octal and hexadecimal.

Decimal₁₀Binary₂Octal₈Hexadecimal₁₆
0000
1111
21022
31133
410044
510155
611066
711177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
16100002010
17100012111
18100102212
19100112313
20101002414
21101012515
22101102616
23101112717
24110003018
25110013119
2611010321A
2711011331B
2811100341C
2911101351D
3011110361E
3111111371F
321000004020
331000014121
341000104222
351000114323
361001004424
371001014525
381001104626
391001114727
401010005028
411010015129
42101010522A
43101011532B
44101100542C
45101101552D
46101110562E
47101111572F
481100006030
491100016131
501100106232
511100116333
521101006434
531101016535
541101106636
551101116737
561110007038
571110017139
58111010723A
59111011733B
60111100743C
61111101753D
62111110763E
63111111773F
64100000010040
65100000110141
66100001010242
67100001110343
68100010010444
69100010110545
70100011010646
71100011110747
72100100011048
73100100111149
7410010101124A
7510010111134B
7610011001144C
7710011011154D
7810011101164E
7910011111174F
80101000012050
81101000112151
82101001012252
83101001112353
84101010012454
85101010112555
86101011012656
87101011112757
88101100013058
89101100113159
9010110101325A
9110110111335B
9210111001345C
9310111011355D
9410111101365E
9510111111375F
96110000014060
97110000114161
98110001014262
99110001114363
100110010014464
101110010114565
102110011014666
103110011114767
104110100015068
105110100115169
10611010101526A
10711010111536B
10811011001546C
10911011011556D
11011011101566E
11111011111576F
112111000016070
113111000116171
114111001016272
115111001116373
116111010016474
117111010116575
118111011016676
119111011116777
120111100017078
121111100117179
12211110101727A
12311110111737B
12411111001747C
12511111011757D
12611111101767E
12711111111777F
1281000000020080
1291000000120181
1301000001020282
1311000001120383
1321000010020484
1331000010120585
1341000011020686
1351000011120787
1361000100021088
1371000100121189
138100010102128A
139100010112138B
140100011002148C
141100011012158D
142100011102168E
143100011112178F
1441001000022090
1451001000122191
1461001001022292
1471001001122393
1481001010022494
1491001010122595
1501001011022696
1511001011122797
1521001100023098
1531001100123199
154100110102329A
155100110112339B
156100111002349C
157100111012359D
158100111102369E
159100111112379F
16010100000240A0
16110100001241A1
16210100010242A2
16310100011243A3
16410100100244A4
16510100101245A5
16610100110246A6
16710100111247A7
16810101000250A8
16910101001251A9
17010101010252AA
17110101011253AB
17210101100254AC
17310101101255AD
17410101110256AE
17510101111257AF
17610110000260B0
17710110001261B1
17810110010262B2
17910110011263B3
18010110100264B4
18110110101265B5
18210110110266B6
18310110111267B7
18410111000270B8
18510111001271B9
18610111010272BA
18710111011273BB
18810111100274BC
18910111101275BD
19010111110276BE
19110111111277BF
19211000000300C0
19311000001301C1
19411000010302C2
19511000011303C3
19611000100304C4
19711000101305C5
19811000110306C6
19911000111307C7
20011001000310C8
20111001001311C9
20211001010312CA
20311001011313CB
20411001100314CC
20511001101315CD
20611001110316CE
20711001111317CF
20811010000320D0
20911010001321D1
21011010010322D2
21111010011323D3
21211010100324D4
21311010101325D5
21411010110326D6
21511010111327D7
21611011000330D8
21711011001331D9
21811011010332DA
21911011011333DB
22011011100334DC
22111011101335DD
22211011110336DE
22311011111337DF
22411100000340E0
22511100001341E1
22611100010342E2
22711100011343E3
22811100100344E4
22911100101345E5
23011100110346E6
23111100111347E7
23211101000350E8
23311101001351E9
23411101010352EA
23511101011353EB
23611101100354EC
23711101101355ED
23811101110356EE
23911101111357EF
24011110000360F0
24111110001361F1
24211110010362F2
24311110011363F3
24411110100364F4
24511110101365F5
24611110110366F6
24711110111367F7
24811111000370F8
24911111001371F9
25011111010372FA
25111111011373FB
25211111100374FC
25311111101375FD
25411111110376FE
25511111111377FF

Frequently asked questions

How do I convert binary to hex?

Split the binary number into groups of 4 bits starting from the right (pad the leftmost group with zeros if it is short), then replace each group with its hex digit: 0000 = 0, 0001 = 1, …, 1010 = A, 1111 = F. The converter above shows this grouping live for your exact number.

What is 101010 in hex?

101010 in hex is 2A. Group from the right: 10 and 1010; pad the first group to 0010 = 2, and 1010 = A.

What is 11111111 in hex?

11111111 in hex is FF: two groups of 1111, and 1111 is F. That is also why 255 shows up as FF in hex — it is the largest two-digit hex value.

Why group from the right and not the left?

Bit positions count from the right (the rightmost bit is worth 1). Grouping from the right keeps every group aligned to its correct place values; grouping from the left would misalign the last group whenever the length is not a multiple of 4.

What if the binary number does not divide evenly into 4s?

Pad the leftmost group with zeros at the front until it has 4 bits. Leading zeros do not change the value: 101 becomes 0101, which is 5 in hex.