How to use the Hex to Decimal Converter
Type a hex number using the digits 0 to 9 and the letters A to F. You get the decimal value, plus binary and octal.
How hex to decimal conversion works
Each hex place is worth 16 times the place to its right: 1, 16, 256, 4,096 and so on. Multiply each digit by its place value, with A = 10 through F = 15, and add. For 1F4 that is 1 × 256 + 15 × 16 + 4 × 1 = 256 + 240 + 4 = 500.
Where hex values come from
Error codes, memory addresses, colour codes, Unicode code points and checksums are usually printed in hex. Converting them to decimal helps when a form, spreadsheet or formula expects an ordinary number.
Why one hex digit equals four binary digits
Each hex digit represents a value from 0 to 15, and four binary digits can also count from 0 to 15. So every hex digit maps to exactly four bits: F is 1111, A is 1010 and 3 is 0011. That makes it easy to read a hexadecimal number as binary, which is why programmers use hex. FF is 1111 1111 in binary and 255 as a decimal number.
Powers of 16
Each place in a hex number is a power of 16: 16⁰ = 1, 16¹ = 16, 16² = 256, 16³ = 4,096 and 16⁴ = 65,536. To convert by hand, multiply each digit by its power of 16 and add the results. 2A3 is 2 × 256 + 10 × 16 + 3 × 1 = 675.
The formula
Sum each digit × 16^position.
Examples
- 1F4
Decimal: 500 Binary: 1 1111 0100 Octal: 764
- FF
Decimal: 255 Binary: 1111 1111 Octal: 377
- 7FFF
Decimal: 32767 Binary: 111 1111 1111 1111 Octal: 77777
Hex to decimal table
| Hex | Decimal |
|---|---|
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
| 10 | 16 |
| 1F | 31 |
| 20 | 32 |
| 40 | 64 |
| 64 | 100 |
| 7F | 127 |
| 80 | 128 |
| FF | 255 |
| 100 | 256 |
| 1F4 | 500 |
| 3E8 | 1000 |
| FFF | 4095 |
| 1000 | 4096 |
| FFFF | 65535 |
Limitations and assumptions
Runs entirely in your browser. Nothing you enter is uploaded.
Frequently asked questions
What is FF in decimal?
255. F is 15, so FF is 15 × 16 + 15 = 255.
What does 10 mean in hex?
Sixteen. The 1 sits in the sixteens place and the 0 in the ones place, so 10 in hex is 16 in decimal.
What is the largest four-digit hex number?
FFFF, which is 65,535 in decimal: the largest value an unsigned 16-bit number can hold.
How do I convert decimal back to hex?
Use the decimal to hex converter, which divides by 16 repeatedly.