Free forever · No sign-up
Hex to Decimal Converter
Convert any hexadecimal number to decimal instantly — with the full step-by-step working shown. Free, fast, no sign-up.
Only hex digits allowed (0-9, A-F).
Your data stays in your browser.
No recent conversions yet.
Also equals
- Binary
- Decimal
- Octal
- Hex
Step-by-step calculation
| Digit | Position | Value (16n) | Contribution |
|---|---|---|---|
| Total | |||
How to convert hex to decimal
- Write down the hex number and number each digit's position from right to left, starting at 0.
- Multiply each digit's value (0-9 = 0-9, A-F = 10-15) by 16 raised to the power of its position.
- Add all the results together — that's your decimal number.
Example: 1A3₁₆ = (1 × 16²) + (10 × 16¹) + (3 × 16⁰) = 256 + 160 + 3 = 419.
Background reading: the hexadecimal system on Wikipedia.
Conversion table
The first 16 hex values, plus a few multi-digit examples showing the positional calculation.
| Hex | Decimal | Calculation |
|---|---|---|
| 0 | 0 | 0 = 0 |
| 1 | 1 | 1 = 1 |
| 2 | 2 | 2 = 2 |
| 3 | 3 | 3 = 3 |
| 4 | 4 | 4 = 4 |
| 5 | 5 | 5 = 5 |
| 6 | 6 | 6 = 6 |
| 7 | 7 | 7 = 7 |
| 8 | 8 | 8 = 8 |
| 9 | 9 | 9 = 9 |
| A | 10 | A = 10 |
| B | 11 | B = 11 |
| C | 12 | C = 12 |
| D | 13 | D = 13 |
| E | 14 | E = 14 |
| F | 15 | F = 15 |
| 10 | 16 | 1×16 + 0 = 16 |
| 2F | 47 | 2×16 + 15 = 47 |
| FF | 255 | 15×16 + 15 = 255 |
| 100 | 256 | 1×256 = 256 |
Powers of 16
| Power | Value |
|---|---|
| 160 | 1 |
| 161 | 16 |
| 162 | 256 |
| 163 | 4096 |
| 164 | 65536 |
Hex to decimal in code
Python
int("FF", 16) # → 255
JavaScript
parseInt("FF", 16); // → 255
C
#include <stdio.h>
#include <stdlib.h>
int main(void) {
long v = strtol("FF", NULL, 16);
printf("%ld\n", v); /* → 255 */
return 0;
}
Real-world applications
- Reading HTML color codes like #FF5733, where each hex pair sets a red, green or blue channel.
- Interpreting memory addresses, error codes and crash dumps in debuggers.
- Working with MAC addresses and IPv6 addresses in networking.
- Writing binary data compactly — one hex digit replaces four bits.
Common mistakes
- Forgetting that A–F mean 10–15, not 1–6.
- Reading hex as decimal — 10₁₆ is sixteen, not ten.
- Ignoring the 0x prefix: 0x10 and plain 10 are different numbers.
Common values
FF₁₆ = 25510₁₆ = 16A₁₆ = 10100₁₆ = 2560₁₆ = 0FFFF₁₆ = 65,535
Key takeaways
- Each hex digit is worth 16× the digit to its right.
- A–F stand for 10–15.
- Two hex digits = one byte = 0–255 (FF₁₆ = 255).
- The 0x prefix just marks a number as hex; it does not change the value.
- Hex is case-insensitive: ff and FF are both 255.
Frequently asked questions
How do I convert hex to decimal?
Multiply each hex digit by 16 raised to its position power (from 0 at the right) and sum the results. Or just use the converter above — it shows every step.
What is FF in decimal?
FF₁₆ = 255 in decimal.
Can this converter handle large hex numbers?
Yes — it supports hex numbers of any length with full precision.
How do you convert hex to decimal by hand?
Multiply each digit (A=10 through F=15) by 16 raised to its position, counting from 0 at the right, then add the results.
Why is hex used instead of binary?
Hex is shorter and easier to read: two hex digits hold a full byte, compared with eight binary digits.
What does the 0x prefix mean?
0x marks a number as hexadecimal — for example 0xFF = 255. You can paste values with or without the prefix.
What is the maximum value of a byte in hex?
FF₁₆ = 255 — two hex digits hold exactly one byte (8 bits).
Is hex case-sensitive?
No — FF and ff both equal 255. The converter accepts both.
Need the reverse? Try our decimal to hex converter.
More converters
Add this converter to your website
Embed our free binary to decimal converter on your own site with one line of code:
<script src="https://binary-to-decimal-28z.pages.dev/embed.js"></script>