Skip to the tool
Binary Translator Free tools

Hex to decimal converter

Type a hex number (0x prefix optional) to get its decimal value and the working.

Updated · Written and checked by Murugan Vellaichamy

Waiting for input

Prefixes 0b, 0o, 0x and spaces or underscores between digits are fine. A point starts the fraction.

Result
Try:

How to convert hex to decimal

Hex digits run 0 to 9 and then A to F, where A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15. Each place is worth 16 times the place to its right: 1, 16, 256, 4096 and so on. Multiply each digit by its place value and add.

DigitPlace valueDigit × place value
1162 = 256256
A (10)161 = 16160
3160 = 13

256 + 160 + 3 = 419, so 1A316 = 41910.

Hex digits

HexDecimalBinary
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
A101010
B111011
C121100
D131101
E141110
F151111

How it’s calculated

Conversions use exact whole-number arithmetic (JavaScript BigInt), so long numbers keep every digit. Fractions are kept as exact ratios; when the digits repeat, the repeating block is found and marked instead of rounded.

Questions

Is hex case sensitive?

No. 1a3 and 1A3 are the same number.

What does the 0x prefix mean?

It marks a number as hexadecimal in programming languages such as C, Java, JavaScript and Python. The converter accepts it and ignores it.

How do I read FF as a signed number?

Tick “Read as signed” and choose 8 bits: FF is 11111111, which is −1 in two’s complement. With 16 bits, 00FF is 255.

More converters

Copied