Hexadecimal to Decimal Converter

Hexadecimal (base 16) is the standard number system for expressing binary data compactly in computing. One hex digit represents exactly four binary bits, so a byte (8 bits) is always two hex digits. Hex uses the digits 0-9 and letters A-F, where A=10, B=11, C=12, D=13, E=14, F=15. This converter accepts either a hex string (like FF or 1A3F) or a decimal integer and converts it into all four common number bases: decimal (base 10), hexadecimal (base 16), binary (base 2), and octal (base 8). It also shows a step-by-step breakdown of how the hex-to-decimal conversion is calculated using position values.

Hex digit values

HexDecimalBinary
000000
110001
550101
991001
A101010
B111011
C121100
D131101
E141110
F151111
FF25511111111
100256100000000

Hexadecimal: frequently asked questions

What is hexadecimal?

Hexadecimal (hex) is a base-16 number system that uses 16 symbols: the digits 0-9 and the letters A-F (where A=10, B=11, C=12, D=13, E=14, F=15). Hex is widely used in computing because one hex digit represents exactly four binary digits (bits), making it a compact way to express binary values. Hex values are often prefixed with '0x' (in C/JavaScript) or '#' (in CSS colors).

How do you convert hexadecimal to decimal?

Multiply each hex digit by 16 raised to the power of its position (from right, starting at 0). Sum all the results. For example, 1A3 in hex: 3 x 16^0 = 3, A (10) x 16^1 = 160, 1 x 16^2 = 256. Total = 256 + 160 + 3 = 419 in decimal.

How do you convert decimal to hexadecimal?

Divide the decimal number by 16 repeatedly, noting the remainder at each step. The remainders (read in reverse order) form the hex number. Remainders of 10-15 are written as A-F. For example, 419 / 16 = 26 remainder 3, 26 / 16 = 1 remainder 10 (A), 1 / 16 = 0 remainder 1. Reading remainders in reverse: 1, A, 3 = 1A3 in hex.

What are hexadecimal numbers used for in computing?

Hex is used extensively in computing for: memory addresses (e.g., 0x7FFF0000), color codes in HTML/CSS (e.g., #FF5733), machine code and assembly language, error codes and debugging, representing Unicode code points (e.g., U+1F600), and network addresses (e.g., MAC addresses like 00:1A:2B:3C:4D:5E). Its compact representation of binary data makes it ideal for low-level programming.

What is the largest single hex digit value?

The largest single hex digit is F, which equals 15 in decimal (1111 in binary). Two hex digits can represent values from 00 (0) to FF (255), which is why bytes (8 bits, values 0-255) are commonly written as two hex digits. For example, 0xFF = 255, the maximum value of an unsigned 8-bit integer.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.