Skip to the content

Hex to Decimal Converter

Turn a hexadecimal number such as 2AF or 0xFF into decimal, with the worth of every digit added up for you.

Type a hexadecimal number in the first field and read it in decimal in the second. It works the other way round as well. Whole numbers only; spaces, underscores and the prefixes 0b, 0o and 0x are fine.

Working

DigitPlace valueDigit × place value
22562 × 256 = 512
A1610 × 16 = 160
F115 × 1 = 15

512 + 160 + 15 = 687

Other bases

from 2 to 36
Bit length
10 bits
Fits in
2 bytes
Share this tool:TwitterFacebookLinkedInWhatsAppEmail

How to convert hexadecimal to decimal by hand

Hexadecimal has sixteen digits. After 9 come the letters A to F, which stand for 10 to 15.

Each place is worth sixteen times the place to its right: 1, 16, 256, 4096, 65536. Multiply every digit by the worth of its place and add the results. For 2AF that is 2 × 256 + 10 × 16 + 15 × 1, or 512 + 160 + 15 = 687.

The working under the two fields at the top of the page does this for whatever number you type.

Good to know

  • Capitals and lower case mean the same: 2af is 2AF. The prefix 0x, as in 0x2AF, only says that the number is hexadecimal and can be left in.
  • Two hex digits make one byte, so FF is 255. A colour such as #FF8800 is three such bytes: 255, 136 and 0.
  • FFFF is 65535 and FFFFFFFF is 4294967295, the largest values that fit in 16 and in 32 bits.

Hexadecimal to decimal table

HexadecimalDecimal
00
11
22
33
44
55
66
77
88
99
A10
B11
C12
D13
E14
F15
1016
HexadecimalDecimal
1420
2032
3250
4064
64100
7F127
80128
C8200
FF255
100256
1F4500
200512
3E81000
4001024
10004096
FFFF65535

The number base converter shows binary, octal, decimal and hexadecimal next to each other, and explains positional notation and two's complement.

See all 9