How to Convert Hexadecimal to Decimal
The 😀 grinning face emoji has the Unicode code point U+1F600. What number is that? Convert the hexadecimal 1F600 to decimal and you get 128,512.
Hexadecimal, or base 16, shows up everywhere in computing: web colors like #FF5733, memory addresses, network hardware IDs and character codes. Here's how to turn any hex number into ordinary decimal.
The Letters Are Just Digits
Hex numbers like 2F or DEADBEEF look like codes mixing numbers and letters. But in base 16, the letters A through F are simply digits, the same way 0 through 9 are. Base 16 needs 16 single symbols, and we only have 10 numerals, so it borrows six letters:
| Hex | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| Decimal | 10 | 11 | 12 | 13 | 14 | 15 |
Once you read "F" as "fifteen," hex works exactly like any other number system.
How Hex Place Values Work
Each place is worth 16 times the place to its right:
| Place (from right) | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|
| Power of 16 | 16⁴ | 16³ | 16² | 16¹ | 16⁰ |
| Value | 65,536 | 4,096 | 256 | 16 | 1 |
Method 1: Multiply by Place Values
Step 1: Convert each hex digit to its decimal value.
Step 2: Multiply each by its power of 16.
Step 3: Add.
Example: 2F
2 × 16 = 32
F (15) × 1 = 15
Total = 47
Example: 1F4
1 × 256 = 256
F (15) × 16 = 240
4 × 1 = 4
Total = 500
Example: 1F600 (the emoji)
1 × 65,536 = 65,536
F (15) × 4,096 = 61,440
6 × 256 = 1,536
0 × 16 = 0
0 × 1 = 0
Total = 128,512
Check with the hexadecimal to decimal converter.
Method 2: Multiply by 16 and Add (Left to Right)
Start with 0. For each digit from left to right, multiply the running total by 16 and add the digit.
Example: 1F4
| Digit | Multiply by 16, then add | Running total |
|---|---|---|
| 1 | 0 × 16 + 1 | 1 |
| F (15) | 1 × 16 + 15 | 31 |
| 4 | 31 × 16 + 4 | 500 |
It's the same Horner's method used for binary, just with 16 instead of 2.
Real-World Example: Web Colors
A web color like #FF5733 is three separate hex bytes: red, green and blue.
FF = 15 × 16 + 15 = 255 (red)
57 = 5 × 16 + 7 = 87 (green)
33 = 3 × 16 + 3 = 51 (blue)
So #FF5733 is rgb(255, 87, 51), a bright orange-red. Each color channel runs from 00 (0) to FF (255).
The Binary Shortcut
Each hex digit represents exactly 4 bits, because 16 = 2⁴. So you can also convert hex to binary first, then binary to decimal:
2F → 0010 1111 → 32 + 15 = 47
For large values, it's usually faster to go straight to decimal, but the binary link explains why programmers love hex. Explore it with the binary to hexadecimal converter and read Binary, Hexadecimal, and Why Programmers Love Base 16.
An Insider Reference: Unicode's Code Space
The Unicode Standard, first published in 1991, assigns every character, from Latin letters to Chinese characters to emoji, a unique number written in hex with a "U+" prefix.
Unicode's code space runs from U+0000 to U+10FFFF. Convert that top value:
10FFFF = 1×16⁵ + 0×16⁴ + 15×16³ + 15×16² + 15×16 + 15 = 1,114,111
That's 1,114,112 possible code points in total, organized into 17 "planes" of 65,536 each. The emoji 😀 at U+1F600 sits in plane 1, the Supplementary Multilingual Plane. Writing these values in hex makes the plane structure obvious in a way decimal never could.
Common Mistakes
1. Forgetting letter values. B is 11, not 2. Write the decimal value under each letter before multiplying.
2. Multiplying by 10 instead of 16. Hex place values are 1, 16, 256, 4,096, not 1, 10, 100.
3. Misreading prefixes and notation. "0x", "#", "U+" and a trailing "h" are just labels meaning "this is hex." They aren't part of the number.
Two Concepts Worth Knowing
Base
A number system's base is how many digits it uses and how much each place multiplies. Decimal is base 10, binary base 2, hex base 16. Compare them in the table of bases.
Nibble
A nibble is 4 bits, exactly one hex digit. Two nibbles make a byte, which is why bytes are written as two hex digits from 00 to FF.
Quick Answer: How Do You Convert Hexadecimal to Decimal?
Replace each hex digit with its value (A=10 through F=15), multiply each by 16 raised to its position (1, 16, 256, 4096, … from the right), and add. For example, 1F4 = 1×256 + 15×16 + 4×1 = 500. Or work left to right: multiply the running total by 16 and add each digit.
Try Them Yourself
- Hexadecimal to Decimal Converter: convert any hex value
- Decimal to Hexadecimal Converter: the reverse
- Binary to Hexadecimal Converter: hex as grouped bits
- Table of Bases: hex alongside other bases
- How to Convert Binary to Decimal: the same idea in base 2
- Hash Functions: where long hex strings come from
Find the hex code of your favorite color in any design tool and convert each pair to decimal. You'll know exactly how much red, green and blue your screen mixes to make it.