Math & Number Utilities100% Client-Side

Convert Binary to Hexadecimal

Paste a binary value to see the same integer written in hexadecimal. Each complete group of four bits corresponds to one hex digit, beginning at the right of the source. This is useful for comparing bit-level values with compact records shown in base sixteen. The tool prints uppercase A through F and drops leading zeroes, so retain the original bit width separately when it matters.

Input
6 chars•1 lines
Output

Reverse tool

Hexadecimal to Binary Converter

Convert an uppercase or lowercase hexadecimal integer to binary. Expand the base-16 value into its exact bits, with optional sign or 0x prefix.

Open Hexadecimal to Binary Converter
Example input
2A
Example output
101010

How to Use the Binary to Hexadecimal Converter Online

  1. 1Paste one whole number written in base 2. Check that its digits belong to that base.
  2. 2Use 0 and 1 for the source magnitude and keep the optional 0b prefix if it is part of the notation you copied.
  3. 3Read the equivalent hexadecimal digits and check any minus sign before copying the result into a fixture.
  4. 4Record both bases with the example. Add any field width, prefix, or spacing separately when the destination requires a particular display.

Input & Output Examples

The result represents the same integer, 42 in base ten, written in base 16.

Input Sample
101010
Expected Output
2A

The three groups map to F, 0, and A.

Input Sample
0b1111_0000_1010
Expected Output
F0A

Practical Developer Workflows

  • Convert a long binary example to a compact display for a fixture.
  • Compare four-bit patterns against their digit from zero through F.
  • Check the hexadecimal magnitude of a negative binary value while retaining its sign.

Zero Server Uploads & Complete Privacy

Runs 100% in your browser; no data is uploaded to any server.

Notice a bug, calculation error, or outdated info?

Let us know directly so our engineering team can fix it.

Frequently Asked Questions

Divide the bits into groups of four from the right. Left-pad the first group when needed for the check. Convert each group to its hex digit. For example, 0010 and 1010 produce 2 and A.

Explore Other Tools

12 suggested tools

View all tools