conversion
Hex to Decimal Converter
Convert hexadecimal to decimal. Perfect for color codes, memory addresses, and debugging register values.
Click to show tips
Try an Example
Pick a scenario to see how the calculator works, then adjust the values
ASCII Letter A
Convert the ASCII code for uppercase A (65) across all bases.
Key values: Decimal 65 · Binary 1000001 · Hex 41
Byte Maximum
The largest value a single byte can hold (255).
Key values: Decimal 255 · Binary 11111111 · Hex FF
Hex Color Code
Convert a common hex color code (deep sky blue) to other bases.
Key values: Hex 00BFFF · Decimal 49151 · Binary nibbles
The Hexadecimal System
Hexadecimal (base-16) uses sixteen digits: 0–9 for values 0–9 and A–F for values 10–15:
| Hex | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Dec | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
Hex is case-insensitive: 3F and 3f are the same value.
Conversion Method
Multiply each hex digit by its positional power of 16 and sum:
Worked Example
Convert to decimal:
Hex in Web Colors
CSS colors use hex notation: #RRGGBB, where each pair is a hex value from 00 (0) to FF (255):
| Color | Hex | RGB Decimal |
|---|---|---|
| Red | #FF0000 | (255, 0, 0) |
| Green | #00FF00 | (0, 255, 0) |
| Blue | #0000FF | (0, 0, 255) |
| White | #FFFFFF | (255, 255, 255) |
| Steel Blue | #4682B4 | (70, 130, 180) |
Why hex for colors? Each RGB channel is one byte (0–255), which maps perfectly to two hex digits (00–FF). This makes hex the most compact human-readable notation for 24-bit color values.
Hex Notation Conventions
0xprefix — C, C++, JavaScript, Python:0x2AF#prefix — CSS colors:#2AFor#0022AAFF$prefix — Assembly, Pascal:$2AFhsuffix — Intel assembly:2AFhU+prefix — Unicode code points:U+0041(letter A)
Frequently Asked Questions
How do you convert hexadecimal to decimal?
Multiply each hex digit by its positional power of 16 and sum. For hex digits A–F, use their decimal values 10–15. For example, .
Is hexadecimal case-sensitive?
No. Both uppercase (A–F) and lowercase (a–f) represent the same values. Convention is to use uppercase in output, but inputs are accepted in either case.
Why is hex used for CSS color codes?
Each RGB color channel is one byte (0–255), which maps perfectly to two hex digits (00–FF). This makes hex the most compact human-readable notation for 24-bit color values. For example, #FF5733 means R=255, G=87, B=51.
What does the 0x prefix mean before hex numbers?
The 0x prefix is a programming convention used in C, JavaScript, Python, and many other languages to indicate that the following digits are hexadecimal, not decimal. Other conventions include # (CSS), $ (assembly), and U+ (Unicode).
What is the decimal value of FF in hex?
FF in hex equals in decimal. This is the maximum value of a single byte (8 bits all set to 1), which is why it appears as the maximum for each RGB color channel.
Related conversion Variants
Explore more conversion options
Binary to Decimal
Binary to Decimal Converter
Decimal to Binary
Decimal to Binary Converter
Decimal to Hex
Decimal to Hexadecimal Converter
Binary to Hex
Binary to Hexadecimal Converter
Octal to Decimal
Octal to Decimal Converter
More Math Calculators
Explore the category