Hex to Decimal Converter
Convert hexadecimal to decimal, decimal to hex and hex to binary as you type, with the working shown step by step.
- Bits needed
- 6
- Bytes
- 1
0010 1111
How hexadecimal becomes decimal
Multiply each digit by 16 to the power of its place, then add them up.
- 2 × 16¹32
- F (15) × 16⁰15
Total47
Launch it on BetterLaunch for free and get it in front of thousands of makers and early adopters.
How to use the hex converter
- Hex to decimal: type a hex value in the Hexadecimal box, with or without 0x. The decimal value appears below, with the working on the right.
- Decimal to hex: type a number in the Decimal box. The hex value updates as you type.
- Hex to binary is shown at the same time. Turn on Group digits to see one group of 4 bits per hex digit.
How hexadecimal works
Hexadecimal, or hex, counts in sixteens. It uses the digits 0 to 9 and then the letters A to F for ten to fifteen. Each place is worth 16 times the one to its right: 1, 16, 256, 4,096 and so on.
Programmers like hex because one hex digit is exactly 4 bits, so two hex digits are one byte. That is why you see it in colour codes (#5E6AD2), memory addresses (0x7FFF), MAC addresses and error codes. It is a short way to write binary.
Hex, decimal and binary chart
| Hex | Decimal | Binary |
|---|---|---|
0 | 0 | 0000 |
1 | 1 | 0001 |
2 | 2 | 0010 |
3 | 3 | 0011 |
4 | 4 | 0100 |
5 | 5 | 0101 |
6 | 6 | 0110 |
7 | 7 | 0111 |
8 | 8 | 1000 |
9 | 9 | 1001 |
A | 10 | 1010 |
B | 11 | 1011 |
C | 12 | 1100 |
D | 13 | 1101 |
E | 14 | 1110 |
F | 15 | 1111 |
Converting words rather than numbers? The binary translator also shows the hex code of every letter.