Hex to Decimal Converter
Type a hexadecimal number to see its decimal value, with every place-value step and the binary and octal forms.
Free, no sign-upRuns in your browserHow we calculate
- Binary
- 1111 1111
- Octal
- 377
- Decimal
- 255
- Hexadecimal
- FF
- Bits needed
- 8
How this was calculated
- Write the hexadecimal digits and give each one a place value of 16ⁿ, counting from 0 on the right.
- F × 16^1 + F × 16^0
- 240 + 15
- Total: 255
How to convert hex to decimal
Hexadecimal (base 16) uses the digits 0–9 and the letters A–F, where A is 10, B is 11 and F is 15. To convert hex to decimal, multiply each digit by a power of 16, starting with 16⁰ at the right, and add the results. This hex to decimal converter does that for you and shows every term, so you can follow the arithmetic or check homework.
Worked example
Take 1A3F. The digits from the left are 1, A (10), 3 and F (15), with place values 16³ = 4,096, 16² = 256, 16¹ = 16 and 16⁰ = 1. So 1A3F = 1 × 4,096 + 10 × 256 + 3 × 16 + 15 × 1 = 4,096 + 2,560 + 48 + 15 = 6,719. A two-digit value is quicker: FF = 15 × 16 + 15 = 255, the largest value one byte can hold.
Where you meet hexadecimal
- Colors. The web color #FF8800 is three bytes: red FF = 255, green 88 = 136, blue 00 = 0.
- Memory addresses and error codes. Debuggers and logs print values like 0x7FFF or 0xDEADBEEF because every hex digit is exactly four bits.
- Character codes. The letter A is 41 in hex, which is 65 in decimal.
Common mistakes
The prefix 0x is only a label and carries no value; the tool accepts it and ignores it. Letters are not case-sensitive, so ff, Ff and FF are all 255. Another slip is reading a hex number such as 10 as ten: in hex it is 16, because the 1 sits in the sixteens place. For the opposite direction, use the decimal to binary converter and group the bits in fours, or read binary to decimal if your source is a string of 0s and 1s.
Limits
The converter works with whole numbers of up to 200 digits and is exact for very long values. It does not handle fractions after a hex point, and negative numbers are shown with a minus sign, not in two's complement.
Frequently asked questions
How do you convert hex to decimal?
Multiply each hex digit by a power of 16, starting with 16⁰ on the right, and add the results. A–F count as 10–15. For example 1A3F = 1×4096 + 10×256 + 3×16 + 15 = 6,719.
What is FF in decimal?
255. F is 15, so FF = 15 × 16 + 15 = 255, the largest value a single byte can hold.
What do the letters A to F mean in hex?
A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15. Hexadecimal needs sixteen digits, so letters continue after 9.
What does the 0x prefix mean?
0x only marks a number as hexadecimal in programming languages such as C and JavaScript. It has no value of its own, and this converter ignores it.
Is hex case-sensitive?
No. ff, Ff and FF are all 255.