What are hexadecimal and decimal numbers?
The decimal system is the everyday base-10 number system. It uses ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
The hexadecimal system is base-16. It uses the decimal digits 0–9 plus the letters A, B, C, D, E and F, where A equals 10 and F equals 15.
Hexadecimal is widely used in computing because one hex digit represents exactly four binary bits. This makes long binary values shorter and easier to read.
How to convert hex to decimal
To convert hexadecimal to decimal, multiply each hex digit by a power of 16. The rightmost digit uses 160, the next digit uses 161, then 162, and so on.
1B7E₁₆ = 1×16³ + 11×16² + 7×16¹ + 14×16⁰ = 7038₁₀
This means hexadecimal 1B7E is equal to decimal 7038.
How to convert hex to binary
To convert hexadecimal to binary, replace each hex digit with its four-bit binary equivalent. Then join the groups together.
1 = 0001
B = 1011
7 = 0111
E = 1110
1B7E₁₆ = 1101101111110₂
Leading zeros are usually removed from the final binary value unless the zeros are needed for a fixed-width format.
Common uses of hexadecimal
Hexadecimal is common in programming, debugging, memory addresses, Unicode code points, color codes, checksums and binary file inspection.
For example, web color values often use hexadecimal notation. The color #FF0000 represents red, where FF is the red channel and equals decimal 255.
Input rules
- Use digits 0–9 and letters A–F for hexadecimal input.
- Lowercase letters are accepted and automatically normalized to uppercase.
- Optional prefixes such as 0x are supported.
- Whole numbers are supported. Fractions are intentionally not converted by this tool.