Hex to decimal converter for big integers

Type a hexadecimal value — negative values included — and read its exact decimal form, with the hex and binary results alongside. Results stay exact above 253, where ordinary JavaScript converters lose digits.

Hexadecimal is preselected below: ff and -2a both work. Integers only — no fractions.

Input base

Type a hexadecimal value above to convert it. Nothing leaves your browser.

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 0x prefix 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 -2a converts 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 0 in every base; -0 is normalised to 0.
What this tool does not do
  • No fractional or IEEE-754 conversion: 1.5, 1e3 and 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
Verified hexadecimal to decimal pairs
Hexadecimal inputDecimal outputBinary output
000
101610000
ff25511111111
-2a-42-101010
fff409512 ones
ffff6553516 ones
10000010485761, then 20 zeros
ffffffff429496729532 ones
2000000000000190071992547409931, 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.