Binary to Hexadecimal Converter
Convert a binary number into hexadecimal and a hexadecimal number back to binary.
Supports binary and hexadecimal integers of any length with full working precision.
Updated August 12, 2026
Introduction / overview
Binary to Hexadecimal Converter turns any whole binary number into its hexadecimal equivalent and back again. Because every four binary digits — one nibble — collapse into a single hex digit, the tool also shows the binary value grouped into nibbles, so appears as instead of a hard-to-read run of digits.
Both fields are editable. Type a binary string and the hexadecimal value appears; type a hex value and the binary appears. The Results panel below always shows the clean, copy-friendly forms: the nibble-grouped binary and the standard uppercase hex.
It is the tool to reach for when you are decoding a value from code, a network trace, a color, or a register dump — or just double-checking a conversion you did by hand. Every conversion is exact, and there is no fixed bit-width cap, so values of any length work as long as they are non-negative whole numbers.
How to use / quick start
Type a binary number
In the Binary field, enter a string made only of 0s and 1s. Leading zeros are fine but not required — the tool works with the value, not the number of digits you typed.
Read the other field — or go the other way
The Hexadecimal field fills in automatically. You can also type a hex value instead — digits 0–9 and letters A–F, upper or lower case — and the binary field updates. The editable fields keep exactly what you type, so a lowercase stays lowercase.
Grab the canonical form from Results
The Results panel shows the nibble-grouped binary (for example 0001 1111 1101) and the standard uppercase hex (1FD) — the two forms you would paste into code or documentation.
Example — convert 111111101 to hex
Type in the Binary field. The tool pads the nine bits to the next nibble boundary and groups them:
The Results panel reads Binary (grouped): 0001 1111 1101 and Hexadecimal (standard): 1FD, and the note above it says this is a 12-bit representation.
Calculation method
Binary to hexadecimal is a place-value conversion. Starting from the right, the binary digits are split into groups of four (nibbles); if the leftmost group has fewer than four bits, it is padded with leading zeros so every group lines up. Each nibble is a value from 0 to 15, which maps to a single hex digit.
Going the other way, each hex digit expands back into its own four-bit pattern — to , to , to — and the patterns are joined in order.
Worked example
Split into nibbles from the right, padding the leftmost group:
Each nibble becomes one hex digit, and the digits keep the same order as the groups.
Variables
- — the hexadecimal value
- — the number of nibbles (hex digits)
- — the -th hex digit (0–9, A–F)
- — the bit at position (0 or 1)
Frequently asked questions
Why does the binary result show leading zeros?
Because one hex digit always stands for four bits, the binary value is padded to the next nibble boundary so every group is complete. has nine bits, so it is shown as (12 bits). The leading zeros do not change the value.
I typed lowercase “fa” but Results shows “FA” — did my input change?
No. The editable Hexadecimal field keeps exactly what you typed, so lowercase stays lowercase while you work. The Results panel always shows the standard uppercase form for clean copying — both represent the same value.
Can I convert negative numbers or fractions?
No — this tool converts non-negative whole numbers only. The Binary field accepts only 0 and 1, and the Hexadecimal field accepts only 0–9 and A–F, so a minus sign, decimal point, or fraction is not valid input. For negative or fixed-width binary, use the binary converter.
Limitations
This calculator accepts non-negative whole numbers only: the Binary field takes the digits 0 and 1, and the Hexadecimal field takes 0–9 and A–F. A minus sign, decimal point, or any other character produces a “Enter a valid number.” message and the value is not converted. There is no fixed bit-width cap, and because the conversion is an exact integer operation the result is never rounded — the grouped form simply adds the leading zeros needed to complete nibbles.
Related Calculators
Scale Calculator
Calculate scale factors and convert scaled or real dimensions for length, area, and volume.
Text to ASCII binary
Convert text to ASCII (8-bit) binary and convert ASCII binary back to text. Clean input automatically and copy results instantly.
Integer Base Converter
Convert an integer between bases 2–64 (binary, octal, decimal, hexadecimal, base64, and custom). Runs locally in your browser.
IPv4 address converter
Convert an IPv4 address into decimal, binary, hexadecimal, and IPv4-mapped IPv6 representations. Runs locally in your browser with one-click copy.
Roman Numeral Converter
Convert an Arabic number up to 3,999,999 into Roman numerals or read a Roman numeral back into a number. Both directions run in your browser.
Fraction to Percent Calculator
Convert fractions to percentages and vice versa instantly