How to use it· 4 steps
- Paste the hexadecimal value. Upper or lower case both work, and a 0x prefix is stripped automatically.
- Read the decimal value, with binary, octal and base 36 beside it.
- Follow the working table to see each digit's value and power of 16, and the sum.
- If the value is a signed integer such as an error code, open the two's complement panel to see its signed meaning.
Step by step
How to use the hex to decimal converter
- 1Paste the hexadecimal value. Upper or lower case both work, and a 0x prefix is stripped automatically.
- 2Read the decimal value, with binary, octal and base 36 beside it.
- 3Follow the working table to see each digit's value and power of 16, and the sum.
- 4If the value is a signed integer such as an error code, open the two's complement panel to see its signed meaning.
Hex digits and the powers of 16
Hexadecimal is base 16, so it needs sixteen digits: 0 to 9, then A for 10, B for 11, C for 12, D for 13, E for 14 and F for 15. Each position is worth sixteen times the one to its right. From the right, the place values are 1, 16, 256, 4,096, 65,536 and 1,048,576.
To convert, multiply each digit's value by its place value and add. 7E9 is 7 × 256 + 14 × 16 + 9 × 1 = 1,792 + 224 + 9 = 2,025. FF is 15 × 16 + 15 = 255. 1F4 is 256 + 15 × 16 + 4 = 500. The working table shows exactly this for whatever you type, so you can check a homework answer line by line.
The double-and-add shortcut works in hex too, with 16 in place of 2: start at 0, and for each digit from the left multiply by 16 and add the digit. For 7E9: 7, then 7 × 16 + 14 = 126, then 126 × 16 + 9 = 2,025.
Why programmers write numbers in hex
One hex digit is exactly four bits, so a byte is always two hex digits and a 32-bit value always eight. That makes hex a compact, readable stand-in for binary: 0xFF is plainly a byte of all ones, which is not obvious from 255, and 0x80000000 is plainly a single top bit, which is not obvious from 2,147,483,648.
That is why hex appears wherever software exposes raw values — memory addresses in a debugger, colour codes in CSS, MAC addresses on a network card, byte values in a hex editor, Unicode code points like U+1F600, and the long hashes that identify Git commits and file checksums. Converting to decimal is usually needed at the boundary, when a value has to be compared with a limit, typed into a form or explained to someone.
Signed hex: when FFFFFFFF is −1
A hex value read from a register or a log may be a signed integer. As a 32-bit signed value, FFFFFFFF is −1 and 80000000 is −2,147,483,648, the most negative 32-bit number. To read signed hex by hand, take the unsigned value and subtract 2^32 when the first digit is 8 or higher.
Windows error codes are a common case. 0x80070005, Access Denied, is 2,147,942,405 unsigned, but tools that print it as a signed 32-bit integer show −2,147,024,891. Both are the same 32 bits. The converter's main result gives the unsigned value; the two's complement panel shows the pattern and tells you when the top bit is set, which is when the signed reading turns negative.
Hex in colour codes
A CSS colour like #1E90FF is three hex bytes run together: 1E for red, 90 for green and FF for blue. Converting each pair separately gives 30, 144 and 255 — the rgb(30, 144, 255) form of the same colour. Converting the whole six digits at once gives 2,003,199, which is a valid number but not one any colour tool uses.
For colours, the HEX to RGB converter does the pair-by-pair split for you and handles the 3-digit shorthand and 8-digit codes with transparency, which a plain number converter has no reason to know about.
Mistakes that change the value
Confusing look-alike characters. The letter O is not a hex digit and B is easily misread as 8 in some fonts. A value that will not convert, or converts to something unexpected, often has one of these in it; the converter names any character that is not a valid digit.
Treating 10 as ten. In hex, 10 is sixteen and 100 is 256. A value with no letters in it, such as 1234, is still a different number in hex (4,660) than in decimal, so it is worth labelling with 0x or a subscript whenever there could be doubt.
Reading bytes in the wrong order. Most processors store multi-byte numbers little-endian, least significant byte first, so a memory dump showing E9 07 holds the value 0x07E9, which is 2,025 — not 0xE907. Reverse the byte pairs before converting values copied from a dump or a packet capture.
Answers
Frequently asked questions
How do you convert hex to decimal?
Multiply each digit by 16 raised to its position, counting from 0 at the right, and add the results. A to F count as 10 to 15. For 2F: 2 × 16 + 15 = 47.
What is 0xFF in decimal?
255. 0x is only a prefix that marks the number as hexadecimal; FF is 15 × 16 + 15. It is the largest value that fits in one byte.
Is hex case-sensitive?
No. ff, Ff and FF are the same number. Lower case is common in code and hashes, upper case in documentation; the converter accepts both.
Why is my hex error code shown as a negative number elsewhere?
Some tools print 32-bit codes as signed integers. 0x80070005 is 2,147,942,405 unsigned and −2,147,024,891 signed — the same bits. The two's complement panel shows both readings.
Can it convert long hex values like hashes or 64-bit addresses?
Yes, exactly. The converter uses arbitrary-precision integers, so a 64-character SHA-256 hash converts to its full 78-digit decimal value without rounding.