Hex to Binary and Decimal Converter

Type in any field and the other two update in real time. Binary is displayed grouped in nibbles (4-bit groups).

Hexadecimal (base 16)
Valid characters: 0–9, A–F (upper or lower case)
Binary (base 2)
Grouped in nibbles (4-bit groups). Spaces are ignored when typing.
Decimal (base 10)
Positive integer up to 2⁵³ (9,007,199,254,740,992)
Reference table 0x00 – 0xFF
HexBinaryDec

How the conversion works

The calculator uses decimal as an intermediate base for all conversions:

The tool accepts optional prefixes: 0x for hexadecimal and 0b for binary. Spaces within binary input are ignored automatically.

What is a nibble?

A nibble is 4 consecutive bits. A full byte (8 bits) has 2 nibbles. The exact nibble–hex digit correspondence is why hexadecimal is so useful in computing: one byte is expressed with just 2 hex characters instead of 8 binary digits.

Practical example: the colour #1A3C5E

The navy blue colour of this page in CSS is #1a3c5e. Each hex pair represents one colour channel (red, green, blue):

1A hex → 0001 1010 binary → 26 decimal (red)
3C hex → 0011 1100 binary → 60 decimal (green)
5E hex → 0101 1110 binary → 94 decimal (blue)

This explains why hexadecimal is the standard for web colours: two hex digits represent exactly the 256 possible levels (0–255) of each RGB colour channel.

Frequently asked questions

How do you convert hexadecimal to binary?
Each hexadecimal digit corresponds exactly to 4 bits in binary. For example, A in hex (10 in decimal) is 1010 in binary, and F (15) is 1111. To convert 2F hex: 2 → 0010, F → 1111, result: 0010 1111. You can use this calculator to do the conversion instantly by typing in any field.
What is hexadecimal used for in computing?
Hexadecimal is more compact than binary: one byte (8 bits) is represented with just 2 hex digits. It is used for web colours (#FF5733), memory addresses (0x7FFF0000), UUID identifiers, file checksums (MD5, SHA-256), code debugging and CPU register values. It is much more readable for humans than raw binary.
What is a nibble in binary?
A nibble (also spelled nybble) is 4 consecutive bits. One byte contains 2 nibbles. The key advantage is that each nibble corresponds exactly to one hexadecimal digit, making hex–binary conversion very straightforward. A nibble can take 16 possible values: from 0000 to 1111 (equivalent to 0x0–0xF).
How do you convert binary to decimal?
Each bit has a positional value equal to a power of 2. The rightmost bit is worth 2⁰=1, the next 2¹=2, then 2²=4, 2³=8, and so on. To convert 1011 binary to decimal: 1×8 + 0×4 + 1×2 + 1×1 = 11. Add up only the powers of 2 at positions where a 1 appears.
What is the difference between hexadecimal and binary?
Binary (base 2) uses only the digits 0 and 1 and is the native language of processors: all data is stored internally as bits. Hexadecimal (base 16) uses 16 symbols (0–9 and A–F) and is a shorthand notation for binary: 1 hex digit equals exactly 4 bits. Hex is more compact and readable for programmers.
Where does hexadecimal appear in everyday life?
In CSS and HTML colours (#1a3c5e, #fff), in network card MAC addresses (e0:d5:5e:a2:b3:c1), in Windows error codes (0xC000005), in image RGB values and in checksums of downloaded files (MD5, SHA-256). Also in consumer electronics chips and Arduino microcontrollers.

Last updated

Converter updated in 2026. Supports positive integers up to 2⁵³ (JavaScript's safe integer limit for exact integer arithmetic).