How to Convert Hex to Decimal
Converting hexadecimal (Base-16) to decimal (Base-10) is straightforward once you know the weight of each digit position:
- Write down the hex digits and replace letters
A–Fwith their decimal values (A=10,B=11,C=12,D=13,E=14,F=15). - Multiply each digit by
16^position, counting positions from right to left starting at0. - Add all products together to get the Base-10 integer.
This hex to decimal converter performs those steps automatically using BigInt arithmetic, so even 64-bit memory addresses and 256-bit cryptographic values convert with exact integer precision. Click Swap Direction above to convert decimal back to hexadecimal using repeated division by 16.
Worked Hex to Decimal Examples
Here are verified inputs and outputs you can test directly in the calculator above:
| Hexadecimal Input | Positional Expansion | Decimal Output |
|---|---|---|
2E |
(2 × 16¹) + (14 × 16⁰) = 32 + 14 |
46 |
FF |
(15 × 16¹) + (15 × 16⁰) = 240 + 15 |
255 |
1A3F |
(1 × 4096) + (10 × 256) + (3 × 16) + (15 × 1) |
6719 |
FFFF |
(15 × 4096) + (15 × 256) + (15 × 16) + 15 |
65535 |
DEADBEEF |
32-bit unsigned integer (8 hex digits) |
3735928559 |
Converting Decimal Back to Hexadecimal
To convert a decimal integer to hex by hand, divide the decimal number by 16, record the remainder (0–15, mapped to 0–F), and repeat with the integer quotient until the quotient reaches 0. Reading the remainders from bottom to top yields the hexadecimal result.
For example, converting 46₁₀:
46 ÷ 16 = 2remainder14(E)2 ÷ 16 = 0remainder2(2)- Reading bottom to top gives
2E₁₆.
When you click Swap Direction in the tool above, the Step-by-Step Calculation panel prints every division and remainder line automatically for numbers up to 1,000,000,000,000.
Common Uses for Hex to Decimal Conversion
- Debugging memory offsets and pointer arithmetic: Crash logs and debuggers display addresses in hex (
0x7FFF), while array indices and buffer lengths are easier to reason about in decimal. - Inspecting RGB color channels: CSS hex colors like
#2563EBsplit into three 8-bit channels:0x25 = 37(Red),0x63 = 99(Green), and0xEB = 235(Blue). - Network packets and error codes: HTTP status extensions, USB vendor/product IDs, and Windows/POSIX error codes frequently appear in hex documentation.
Need binary, octal, or ASCII text at the same time? Jump back to the All-in-One Hex Converter, or inspect individual bits with the Hex to Binary Converter.