Hex to Decimal Converter
Paste a hex value (0x prefix and spaces are fine) to get its decimal value, with every digit’s power of 16 shown.
Hex uses only 0–9 and A–F
In decimal (base 10)
1,000
Hex 3 E8 is 1,000 in decimal (base 10).
3×256 + 14×16 + 8 = 1,000
Tap a digit to step it up. Each tile is worth its digit × 16n.
Bytes in memory2 bytes, big- and little-endian
The +0, +1 … under each byte is its address offset. Big-endian puts the most significant byte first; little-endian puts it last.
How to convert hex to decimal
Hexadecimal is base 16. It needs sixteen digit symbols, so after 0–9 it uses letters: A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15. Each place is worth 16 times the one to its right: 1, 16, 256, 4,096, 65,536 and so on.
Multiply each digit’s value by its place and add the results. For 1A3F: 1 × 4,096 + 10 × 256 + 3 × 16 + 15 × 1 = 4,096 + 2,560 + 48 + 15 = 6,719.
Prefixes only say the base and are not digits: 0x1A3F in C, JavaScript or Python, #1A3F in some assemblers, 1A3Fh in Intel notation. This converter ignores 0x, spaces and underscores.
value = Σ digitᵢ × 16ⁱ, with A–F standing for 10–15
- A CSS colour such as #1A3F5C is three bytes in hex: 1A = 26 red, 3F = 63 green and 5C = 92 blue. Source: CSS Color Module Level 4, hex notation.
Hex digits and common hex values in decimal
The sixteen hex digits, then the round hex numbers and limits that show up in code and memory sizes.
| Hex | Decimal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 8 |
| 9 | 9 |
Show all 33 rowsShow fewer
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
| 10 | 16 |
| 20 | 32 |
| 40 | 64 |
| 64 | 100 |
| 7F | 127 |
| 80 | 128 |
| FF | 255 |
| 100 | 256 |
| 3E8 | 1,000 |
| 400 | 1,024 |
| FFF | 4,095 |
| 1000 | 4,096 |
| 7FFF | 32,767 |
| FFFF | 65,535 |
| 10000 | 65,536 |
| 7FFFFFFF | 2,147,483,647 |
| FFFFFFFF | 4,294,967,295 |
Frequently Asked Questions
What is FF in decimal?
FF is 255: 15 × 16 + 15. It is the largest value of one byte, which is why colour channels (#FF0000) and IP masks (255) top out there.
Is hex case-sensitive?
No. ff, FF and Ff are the same number. Style guides differ (CSS colours are usually lower case, memory dumps upper case), but the value is identical.
Why do programmers use hex instead of decimal?
One hex digit is exactly four bits, so a byte is always two hex digits and a 32-bit word eight. Bit patterns stay readable in hex, while in decimal they turn into numbers with no visible structure.