How hexadecimal to decimal conversion works
Hexadecimal is base 16: each digit position is worth 16position, using the
digits 0–9 and then a–f for the values 10–15. To convert hex to decimal by hand, multiply
each digit by its position value and add the results. For 1A3:
1×16² + 10×16 + 3 = 419 — and dividing 419 repeatedly by 16
reads the digits back. The tool runs the same positional arithmetic with arbitrary-precision
integers, so no digit is dropped at any magnitude.
Input rules and limits
- Base 16 is preselected: digits 0–9 and a–f, case-insensitive, no prefix. A
0xprefix is an error, not a marker. Switch the selector to base 10 (digits 0–9) or base 2 (digits 0–1) to convert the other way. - One optional leading
+or-. Signed values are supported: the minus is a mathematical sign, so-2aconverts to-42. Two's-complement 32-bit or 64-bit wrapping is not performed. - Leading and trailing whitespace is ignored. Commas, underscores, spaces, decimal points and exponent notation inside the number are rejected with a message naming the offending character.
- Maximum 4096 digits (about 16,384 bits). Longer input is refused up front instead of being computed partially.
- Hex is echoed lowercase and unprefixed. Zero is printed as
0in every base;-0is normalised to0.
What this tool does not do
- No fractional or IEEE-754 conversion:
1.5,1e3and bit-level float interpretation are out of scope and rejected. - No bases other than 2, 10 and 16, and no two's-complement int64/uint64 view.
- No batch conversion or file upload in this version.
Hex to decimal values you can check by hand
| Hexadecimal input | Decimal output | Binary output |
|---|---|---|
| 0 | 0 | 0 |
| 10 | 16 | 10000 |
| ff | 255 | 11111111 |
| -2a | -42 | -101010 |
| fff | 4095 | 12 ones |
| ffff | 65535 | 16 ones |
| 100000 | 1048576 | 1, then 20 zeros |
| ffffffff | 4294967295 | 32 ones |
| 20000000000001 | 9007199254740993 | 1, then 52 zeros, then 1 |
Uppercase spellings name the same values: FF is ff and
-2A is -2a. This tool prints hexadecimal in lowercase and
without a 0x prefix.
Starting from a decimal number?
The decimal to hex converter reads a decimal integer — or a binary one — and returns the exact hexadecimal form, with the same input rules and the same 4096-digit limit.
Frequently asked questions
How do I convert ff to decimal?
Read each hex digit by its position: f is 15, so
ff = 15 × 16 + 15 = 255. Uppercase
FF names the same value; this tool accepts either case and prints the decimal
result 255.
What is -2a in decimal?
-2a converts to -42, because
2a = 2 × 16 + 10 = 42. The leading minus
is a mathematical sign: this tool does not reinterpret the value as a 32-bit or 64-bit
two's-complement bit pattern.
Why does 20000000000001 in hex convert to 9007199254740993 and not 9007199254740992?
Hex 20000000000001 is 253 + 1, which is
9007199254740993. Converters that compute through double-precision floating point cannot
represent 253 + 1 and silently round it to 253, printing
9007199254740992. This tool uses arbitrary-precision integers, so the decimal
result keeps the final 1.
Does the hex to decimal conversion handle values larger than 64 bits?
Yes — up to 4096 input digits, well past the 64-bit range. The boundary
ffffffffffffffff (18446744073709551615) is just an ordinary value here, and no
two's-complement wrapping is performed.
Can I type a decimal value on this page?
The input base selector starts on base 16 hexadecimal, which is what hex to decimal conversion needs. Switching it to base 10 lets you type decimal digits instead, and the same converter returns the exact hex and binary values.
Privacy
Everything runs in this page. Your numbers are not sent anywhere, not stored, and not logged. This site counts page visits with PurrHog, a self-hosted analytics server run by the same operator: a visit sends only the page path and a random per-tab identifier — never anything you type and never a result. Any HTTP request, including that one, shows your IP address and standard connection metadata to the receiving server; event data is kept for one year. Your browser's Do Not Track or Global Privacy Control signal disables sending entirely. No cookies, no ads, no third-party code.