⚡ Free Binary Converter

Binary to Hex Converter

Convert binary to hexadecimal instantly with an accurate base-2 to base-16 converter. Enter a binary integer to get its hex value, see the 4-bit grouping, and understand exactly how each binary group maps to a hexadecimal digit.

✓ Free ✓ No sign-up ✓ Exact conversion ✓ Runs in your browser
2→16
Binary → Hex
Ready
Base 2 input
BIN
Enter only binary digits 0 and 1.
Try:
✓ Hexadecimal Result
0
Base 16 hexadecimal value
Binary bits 0
Hex digits 0
Conversion Base 2 → Base 16
4-bit grouping:

What Is a Binary to Hex Converter?

A binary to hex converter changes a number written in binary (base 2) into the equivalent hexadecimal (base 16) representation. Binary uses only 0 and 1. Hexadecimal uses sixteen symbols: the digits 0–9 followed by the letters A–F for values ten through fifteen.

Binary and hexadecimal have a particularly useful mathematical relationship: 16 equals 24. Therefore, every hexadecimal digit represents exactly four binary bits. This makes direct binary-to-hex conversion much simpler than converting through decimal.

For example, binary 1111 maps directly to hexadecimal F, while 1010 maps to A. Longer binary numbers can be divided into groups of four and converted group by group.

Binary — Base 2

Uses two symbols, 0 and 1. Each position represents a power of two.

Hexadecimal — Base 16

Uses 0–9 and A–F. One hexadecimal digit can represent exactly four bits.

How to Use the Binary to Hex Converter

Enter a binary integer

Type or paste a value such as 10101111. Only 0 and 1 are valid binary digits.

Convert to hexadecimal

The result updates for valid input, or you can select the Convert to Hex button.

Read the hex result

BinaryCon displays the corresponding hexadecimal value using uppercase A–F.

Check the 4-bit grouping

Review how the binary number was separated into groups and how each group produced one hexadecimal digit.

Copy the answer

Use Copy when you need the hexadecimal value for code, debugging, documentation, study, or another conversion.

Binary to Hexadecimal 4-Bit Mapping

Four bits have 16 possible combinations, from 0000 through 1111. These combinations map exactly to the sixteen hexadecimal digits.

Binary Hex Decimal Binary Hex Decimal
000000100088
000111100199
0010221010A10
0011331011B11
0100441100C12
0101551101D13
0110661110E14
0111771111F15
Key rule: one hexadecimal digit represents exactly four binary bits because 16 = 24.

Worked Example: Convert 10101111 Binary to Hex

The binary number 10101111₂ contains eight bits, so it divides evenly into two groups of four.

Step 1: Group the binary digits from the right 1010 1111 Step 2: Convert each 4-bit group 1010₂ = A₁₆
1111₂ = F₁₆
Step 3: Join the hexadecimal digits 10101111₂ = AF₁₆ Therefore, binary 10101111 equals hexadecimal AF.

What If the Binary Number Does Not Have Groups of Four?

A binary integer does not need to contain a multiple of four digits. When the leftmost group has fewer than four bits, add leading zeros until that group contains four bits.

Convert 101101₂ to hexadecimal. Original: 101101
Group from right: 10 1101
Add leading zeros: 0010 1101
Convert the groups: 0010₂ = 2₁₆
1101₂ = D₁₆
Therefore: 101101₂ = 2D₁₆ Both representations have decimal value 45.
Important: add padding zeros only to the left of an integer. Appending zeros to the right changes its value. For example, 101₂ = 5, but 1010₂ = 10.

Binary to Hex Conversion Table

These verified examples provide quick reference values for common binary integers.

Binary Hex Decimal
111
1022
10044
100088
1010A10
1111F15
100001016
111111F31
1000002032
1111113F63
10000004064
11111117F127
1000000080128
11111111FF255
100000000100256
111111111111FFF4095
100000000000010004096
1111111111111111FFFF65,535

Why Is Hexadecimal Used With Binary?

Binary accurately represents individual bits, but long strings of 0s and 1s can be difficult for people to scan and compare. Hexadecimal provides a much shorter notation while retaining a direct relationship with the underlying bits.

An 8-bit binary value requires eight binary characters but only two hexadecimal digits. A 16-bit value requires four hex digits, and a 32-bit value requires eight. This compact representation is one reason hexadecimal appears frequently in programming and computer systems.

Bit Width Binary Digits Hex Digits Unsigned Maximum
4-bit41F = 15
8-bit82FF = 255
16-bit164FFFF = 65,535
32-bit328FFFFFFFF = 4,294,967,295

Where Binary to Hex Conversion Is Useful

Programming

Hexadecimal is commonly used to express bit patterns, constants, masks, memory-related values, and other low-level numeric data.

Web colors

RGB colors are commonly written in hexadecimal notation such as #FF0000, where each pair represents an 8-bit channel value.

Digital electronics

Register contents and bit patterns are often easier to read in hexadecimal because every hex digit corresponds to four bits.

Debugging

Hex dumps, machine-level data, protocol fields, byte values, and encoded data frequently use hexadecimal for compact presentation.

Uppercase vs Lowercase Hexadecimal

Hexadecimal digits A through F may be written in uppercase or lowercase. For numeric purposes, AF and af represent the same hexadecimal value. BinaryCon displays uppercase letters for consistency and readability.

The letter digits have these values: A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15. They are digits within base 16 rather than separate mathematical variables.

What Does the 0x Prefix Mean?

Programming languages and technical documentation often identify a hexadecimal literal with a 0x prefix. For example, 0xFF identifies FF as a hexadecimal value and represents decimal 255.

The hexadecimal result displayed by this converter does not require the prefix, so it returns FF. You can add 0x when the syntax of your programming language, configuration, or documentation calls for it.

Common Binary to Hex Conversion Mistakes

Grouping from the left

For binary integers, start forming groups of four at the rightmost bit and work toward the left.

Using three-bit groups

Three-bit grouping is for binary-to-octal conversion. Hexadecimal requires groups of exactly four binary bits.

Padding on the right

When an integer needs padding, add zeros to the left. A zero added on the right changes the number by shifting its place values.

Forgetting A–F

Values 10 through 15 are represented by A through F, not multi-digit decimal strings inside a hexadecimal digit.

Related BinaryCon Tools

Continue working with binary, hexadecimal, decimal, and other number representations using these closely related converters.

Binary to Hex Converter FAQs

How do I convert binary to hexadecimal?

Starting at the rightmost bit, divide the binary integer into groups of four. If the leftmost group is incomplete, pad it with leading zeros. Convert each group using the 0000–1111 hexadecimal mapping and join the resulting digits in the same order.

What is binary 1010 in hexadecimal?

1010₂ equals hexadecimal A. The four-bit pattern 1010 has decimal value 10, and hexadecimal represents decimal values 10 through 15 with the letters A through F.

What is 1111 binary in hex?

1111₂ equals F₁₆. The binary place values are 8 + 4 + 2 + 1 = 15, and hexadecimal digit F represents decimal 15.

What is 11111111 binary in hexadecimal?

Group the bits as 1111 1111. Each group maps to F, producing FF. Therefore 11111111₂ = FF₁₆, and both represent decimal 255.

Why do we group binary digits in fours for hexadecimal?

Four bits have 16 possible patterns because 24 = 16. Hexadecimal also has sixteen possible digits. This gives every 4-bit binary pattern a direct hexadecimal equivalent.

Do I need to convert binary to decimal before hex?

No. Direct 4-bit grouping is usually faster and less error-prone. Converting through decimal is mathematically valid, but it adds an unnecessary intermediate step when converting binary integers to hex.

What binary value equals hexadecimal FF?

Each hexadecimal F maps to binary 1111, so FF becomes 1111 1111, or 11111111₂. Its unsigned decimal value is 255.

Does a leading zero change binary-to-hex conversion?

Leading zeros do not change an unsigned integer’s numeric value. For example, 1010 and 00001010 both convert to hexadecimal A. Leading zeros can still be useful when showing a fixed-width value.

Can hexadecimal contain letters?

Yes. Hexadecimal requires sixteen digits but the familiar decimal digits provide only ten symbols. Therefore A, B, C, D, E, and F represent values 10, 11, 12, 13, 14, and 15.

Is binary-to-hexadecimal conversion exact?

Yes for integer values. Every group of four binary bits corresponds exactly to one hexadecimal digit, so the conversion requires no approximation or rounding.

Can this converter handle very long binary numbers?

Yes. The converter processes the input as groups of binary characters instead of first forcing the entire value into a normal JavaScript floating-point number. This preserves the exact hexadecimal representation of long binary integers.

Does this converter support binary fractions?

This calculator is intended for binary integers. Binary fractions require grouping digits on both sides of the binary point and handling fractional positions separately, so a binary point is not accepted by this tool.

Fast Binary to Hex Conversion

Use BinaryCon for quick binary and hexadecimal conversions, clear bit grouping, verified reference values, worked examples, and free number-system tools without creating an account.

Scroll to Top