Boneyard Tools

Binary to Hex Converter

Paste a binary number, made only of 0s and 1s, and read its hexadecimal value as you type. Spaces between groups of bits are ignored, so grouped input like "1111 1111" works the same as "11111111". The whole number is read at once with BigInt, so even binary strings hundreds of bits long convert exactly with no rounding. Nothing is sent to a server; the conversion happens in your browser.

How to convert binary to hex

  1. Type or paste your binary number into the Binary input box, or click Load sample to try 1111 1111 1010 0101.
  2. Group the bits with spaces if it helps you read them; the spaces are stripped before converting.
  3. Tick "Uppercase (A-F)" for uppercase hex digits, or leave it off for lowercase (the default).
  4. Read the Hexadecimal output, which updates live as you edit the input.
  5. Click Copy to place the hex result on your clipboard.

Examples

One byte

11111111
ff

Grouped bits from the sample

1111 1111 1010 0101
ffa5

One nibble in uppercase

1010
A

Frequently asked questions

How does binary relate to hexadecimal?

Each hexadecimal digit maps to exactly 4 binary digits, called a nibble. For example 1111 is f and 1010 is a, so every group of four bits becomes one hex digit and one byte of eight bits becomes two hex digits.

Why convert binary to hex at all?

Hex is far shorter and easier to scan than binary while staying an exact base-two multiple. Programmers use it for memory addresses, byte values, color codes and bit masks because four bits pack neatly into a single character.

Do the spaces in my input matter?

No. All whitespace is removed before the number is read, so 1111 1111 and 11111111 both give ff. Grouping bits into fours or eights only makes them easier for you to read.

What if my bit count is not a multiple of four?

That is fine. The converter reads the whole value rather than fixed nibbles, so padding is optional. Leading zeros are ignored, which means 11111111 and 0011111111 both give ff.

Can it handle very large binary numbers?

Yes. It parses the string with BigInt, so values far beyond the safe range of a normal JavaScript number stay exact. There is no fixed digit limit; the practical ceiling is your device memory.

What characters are allowed?

Only the digits 0 and 1, plus spaces for grouping. Anything else, such as a 2, a letter, or an 0x prefix, is rejected with an "Invalid binary number" message.

Lowercase or uppercase hex, and why does it matter?

The output is lowercase by default (ff), and the checkbox switches it to uppercase (FF). The value is identical; the case is only a style choice that some codebases or specifications prefer.

What happens if the box is empty?

The output stays empty. Input that is only whitespace also produces no result. Type at least one 0 or 1 to get a hex value back.

Is my data uploaded anywhere?

No. The conversion runs entirely in your browser, so your binary number never leaves your device.

Learn more

Related tools