Hex to Decimal Converter
Convert a base-16 hexadecimal number to base-10 decimal. Enter a hex integer to get the exact decimal result, plus binary and octal equivalents.
What is Hex to Decimal Conversion?
Hex to decimal conversion changes a base-16 number (hexadecimal) into its base-10 equivalent (decimal). Hexadecimal uses sixteen digit symbols — 0-9 plus the letters A-F, where A=10, B=11, C=12, D=13, E=14, and F=15 — while decimal uses only 0-9. This conversion comes up when reading color codes, memory addresses, and other data conventionally shown in hex.
For example, hexadecimal 2A equals decimal 42: 2×16¹ + A×16⁰ = 2×16 + 10×1 = 32 + 10 = 42. To convert the other direction, use the Decimal to Hex Converter. For the related base-2 conversion, see Hex to Binary.
How to Convert Hex to Decimal Manually
The standard manual method uses base-16 positional notation:
Positional notation method
- Step 1: Write down the hex number and assign each digit a position, counting from 0 at the rightmost digit.
- Step 2: Convert each hex digit to its decimal value (A=10, B=11, C=12, D=13, E=14, F=15; 0-9 stay the same).
- Step 3: Multiply each digit's decimal value by 16 raised to its position.
- Step 4: Add all the resulting values together.
Worked example: convert 2A to decimal
2A₁₆ Position: 1 0 Hex digit: 2 A 2 × 16¹ = 2 × 16 = 32 A × 16⁰ = 10 × 1 = 10 32 + 10 = 42 Result: 2A₁₆ = 42₁₀
Manual multiplication works for short hex strings, but it is easy to make an arithmetic error on longer numbers — the converter above returns the exact result for any size of input. For a fuller walkthrough with more worked examples, see How to Convert Hex to Decimal: Formula, Steps & Examples.
Hex Digit Reference (0-9, A-F)
Hexadecimal is base 16, so each digit position can hold sixteen possible values. Hex 0-9 use the same digits as decimal; hex A-F use letters for decimal values 10-15.
| Hex | Decimal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 8 |
| 9 | 9 |
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
Hex to Decimal Conversion Table
A quick reference for common hexadecimal values and their decimal equivalent:
| Hexadecimal | Decimal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 9 | 9 |
| A | 10 |
| F | 15 |
| 10 | 16 |
| 1A | 26 |
| 1F | 31 |
| 20 | 32 |
| 2A | 42 |
| 64 | 100 |
| FF | 255 |
| 100 | 256 |
| FFF | 4095 |
| 1000 | 4096 |
| FFFF | 65535 |
Where Hex to Decimal Conversion Is Used
- Color codes: CSS/HTML colors such as #FF5733 are three hex byte pairs for red, green, and blue — converting each pair to decimal gives the RGB values.
- Memory addresses: debuggers and operating systems display addresses in hex; converting to decimal helps with size and offset calculations.
- Programming: hex literals in code (such as 0xFF) are easier to reason about once converted to their decimal value.
- Networking: MAC addresses and IPv6 segments are written in hex and sometimes need decimal conversion for analysis.
- Data and hash digests: hexadecimal dumps and hash values can be converted to decimal for comparison or calculation.
For the related base-8 conversion, see the Octal to Decimal Converter.
Negative Numbers and Two's Complement
This converter accepts hexadecimal integers without a sign. Simply writing a minus sign in front of a hex string (for example, -A) isn't how computers represent negative numbers, and it isn't a fixed, unambiguous format on its own.
Machines represent negative numbers using two's complement, which requires choosing a fixed bit width (such as 8, 16, or 32 bits) before the value's sign can be determined. Use the Two's Complement Calculator to interpret a signed hex value at a specific bit width.
Related Converters
Decimal to Hex
Convert decimal numbers to hexadecimal — the reverse of this tool.
Hex to Binary
Convert hexadecimal numbers to binary notation.
Binary to Hex
Convert binary numbers to hexadecimal notation.
Binary to Decimal
Convert binary numbers to decimal notation.
Two's Complement Calculator
Represent negative numbers in binary or hex at a fixed bit width.
Octal to Decimal
Convert base-8 octal numbers to decimal.
Frequently Asked Questions
How do I convert FF to decimal?
F×16¹ + F×16⁰ = 15×16 + 15×1 = 240 + 15 = 255. Each F equals 15 in decimal.
What is hex A in decimal?
Hex A equals decimal 10. The hex digits A-F represent decimal values 10-15 respectively.
Is hex 100 equal to decimal 100?
No. Hex 100 equals decimal 256: 1×16² + 0×16¹ + 0×16⁰ = 256 + 0 + 0 = 256.
What's the decimal value of FFFF?
Hex FFFF equals decimal 65535, the maximum value a 16-bit unsigned integer can hold.
Do I need to include the 0x prefix?
No — enter the hex digits directly (e.g., FF instead of 0xFF). Input with a 0x prefix is rejected with a message rather than silently stripped.
Are lowercase hex letters valid?
Yes, hex is case-insensitive. ff and FF both convert to the same decimal value, 255; the result display normalizes to uppercase.
Can I convert negative hex values?
Not directly here. Negative numbers need a fixed bit width and a signed format such as two's complement — use the Two's Complement Calculator for that.
What's the largest hex value I can convert?
There is no fixed size limit. Conversion uses BigInt arithmetic built directly from the validated hex string, so arbitrarily long hex numbers convert exactly rather than losing precision — unlike JavaScript's native Number type, which becomes inexact beyond 2^53 - 1 (9,007,199,254,740,991).
Related Tools
You might also find these tools useful
Base Converter
Convert whole numbers between binary, octal, decimal, hex, and custom bases 2-36 in one hub.
Binary Converter
Convert text, UTF-8 bytes, and binary values without focusing only on readable messages.
Binary Calculator
Add, subtract, multiply, and divide binary numbers for math and computer science exercises.
Binary to Decimal
Turn base-2 numbers into decimal values for programming, networking, and study notes.
Binary to HEX
Compress long binary strings into hexadecimal groups for code, memory, and color checks.
Decimal to Binary
Convert everyday base-10 numbers into binary with clear fixed-width output.