Hex to Decimal Converter

Convert Base-16 hexadecimal numbers to Base-10 decimal integers (and back) with live step-by-step positional math.

Examples:
Converting Hexadecimal (Base 16) to Decimal (Base 10).
Step-by-Step Calculation
Runs locally in your browser with arbitrary-precision BigInt math.

Focused Hex Converters

Switch to a dedicated two-way tool for step-by-step math, nibble mapping, or byte-by-byte text decoding.

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:

  1. Write down the hex digits and replace letters A–F with their decimal values (A=10, B=11, C=12, D=13, E=14, F=15).
  2. Multiply each digit by 16^position, counting positions from right to left starting at 0.
  3. 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 = 2 remainder 14 (E)
  • 2 ÷ 16 = 0 remainder 2 (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 #2563EB split into three 8-bit channels: 0x25 = 37 (Red), 0x63 = 99 (Green), and 0xEB = 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.

Frequently Asked Questions

What is 0xFF in decimal?

Hexadecimal 0xFF equals 255 in decimal: (15 × 16) + (15 × 1) = 240 + 15 = 255. It is the largest unsigned value that fits in a single 8-bit byte.

Can I paste values with a 0x prefix?

Yes. You can paste values with or without a leading 0x prefix, uppercase or lowercase letters, and optional spaces or underscores.

Is there a maximum number size for hex to decimal conversion?

Yes. The tool uses native JavaScript BigInt instead of 53-bit floating-point numbers, so integers larger than 2^53 - 1 convert without rounding errors.

How do I convert decimal back to hex?

Click the Swap Direction button in the toolbar. Your current output moves to the input box and the step-by-step panel switches to repeated division by 16.