Hex to Decimal Converter
Convert hexadecimal (base 16) numbers to decimal and back, with binary and octal shown as well. Useful for programming, color codes and memory addresses.
How to use the Hex to Decimal Converter
- Type the number (a 0x prefix is optional for hex).
- Choose whether it is hex, decimal or binary.
- Read the converted values.
How it works
Hexadecimal uses sixteen digits: 0–9 and A = 10, B = 11, C = 12, D = 13, E = 14, F = 15. Each position is worth a power of 16. To convert hex to decimal, multiply each digit by its place value and add: 2F = 2 × 16 + 15 = 47; FF = 15 × 16 + 15 = 255.
Each hex digit corresponds to exactly four binary digits, which is why programmers use hex as a compact way to write binary — one byte is always two hex digits (00 to FF).
Hex to decimal chart
| Hex | Decimal | Hex | Decimal |
|---|---|---|---|
| 0 | 0 | 8 | 8 |
| 1 | 1 | 9 | 9 |
| 2 | 2 | A | 10 |
| 3 | 3 | B | 11 |
| 4 | 4 | C | 12 |
| 5 | 5 | D | 13 |
| 6 | 6 | E | 14 |
| 7 | 7 | F | 15 |
| 10 | 16 | FF | 255 |
| 64 | 100 | 100 | 256 |
Frequently asked questions
What is FF in decimal?
255.
What is 100 in hex?
64 (6 × 16 + 4).
How do hex color codes work?
A color like #FF8800 is three hex bytes for red, green and blue: 255, 136 and 0.
What does the 0x prefix mean?
It marks a number as hexadecimal in programming languages such as C, Java and JavaScript.
Related tools
- Fraction to Decimal Converter
- Decimal to Fraction Calculator
- Decimal to Fraction Inches Calculator
- Roman Numeral Converter
- Scientific Notation Converter
- Binary to Decimal Converter
- Degrees to Radians Converter
- Percent to Decimal Converter
- DMS to Decimal Degrees Converter
- Degrees to Percent Slope Converter
- Octal Converter
- Radians to Degrees Converter