About this tool
Convert hexadecimal (base 16) numbers to decimal. Paste one per line in any common notation: FF, 0xFF, #FF or FFh. Values of any size convert exactly, including 64-bit IDs and hashes that a normal calculator would round.
How to convert hex to decimal
Hex digits go from 0 to 15, written 0–9 then A–F (A = 10 … F = 15). Each position is worth 16 times the one to its right:
0x1F4 = 1×256 + 15×16 + 4×1 = 256 + 240 + 4 = 500
0xFF = 15×16 + 15 = 255
Colour codes
A CSS colour like #7C3AED is three hex bytes: red 7C = 124, green 3A = 58, blue ED = 237. Enter each pair on its own line to get the RGB values, or use the colour converter for all colour formats.
Signed values
Hex dumps and registers often hold signed integers. FFFFFFFF is 4,294,967,295 unsigned but −1 as a signed 32-bit integer. Choose the bit width under Negative numbers (each hex digit is 4 bits, so 8 hex digits = 32 bits) to read it as two’s complement.
Features
- Any size: numbers are converted exactly with arbitrary-precision arithmetic, so 64-bit values and even longer numbers never lose digits (a normal calculator rounds anything above 253).
- Fractions:
3.75→11.11. Fractions that don’t end in the target base, like 0.1 in binary, are cut off after the chosen number of digits and marked with…. - Negative numbers with a minus sign, or as two’s complement in 8, 16, 32 or 64 bits, the way computers store signed integers.
- Flexible input: prefixes (
0b,0o,0x,#), spaces, underscores and thousands separators are ignored. Convert many numbers at once, one per line. - The first number is also shown in every base, with the number of bits it needs.
Quick reference
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 32 | 100000 | 40 | 20 |
| 64 | 1000000 | 100 | 40 |
| 100 | 1100100 | 144 | 64 |
| 127 | 1111111 | 177 | 7F |
| 128 | 10000000 | 200 | 80 |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 1024 | 10000000000 | 2000 | 400 |
FAQ
How do I convert hex to decimal?
Enter the hex number (with or without 0x) and the decimal value appears. By hand, multiply each digit by a power of 16 and add the results.
What is FF in decimal?
255. 100 in hex is 256, and FFFF is 65,535.
What do the letters A–F mean in hex?
They are the digits 10 to 15: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
How do I convert a negative hex number?
Choose the bit width under Negative numbers. FFFFFFFF in 32-bit two’s complement is −1, and FF in 8 bits is −1.
Can it convert very large hex numbers?
Yes, exactly, at any length. 0xFFFFFFFFFFFFFFFF converts to 18446744073709551615 without rounding.