Hex, decimal and binary converter for big integers

Enter an integer in any of the three bases. You get the exact value in the other two. Results stay exact above 253, where ordinary JavaScript converters lose digits.

Signs and whitespace are handled: -26, 0xFF, 0b1010. Integers only — no fractions.

Input base

Type a number above to convert it. Nothing leaves your browser.

How the conversion works

Each digit position is worth baseposition. Reading 1A3 as hexadecimal gives 1×16² + 10×16 + 3 = 419 in decimal, and 419 reads back as 110100011 in binary. The tool performs the same positional arithmetic with arbitrary-precision integers, so no digit is dropped at any magnitude.

Input rules and limits
  • Bases supported: 2 (digits 0–1), 10 (digits 0–9), 16 (digits 0–9, a–f, case-insensitive).
  • One optional leading + or -. The minus is a mathematical sign; two's-complement 64-bit wrapping is not performed.
  • 0x prefixes hexadecimal input, 0b prefixes binary input. Decimal input takes no prefix, so 0x10 there is an error, not 16.
  • 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 output is 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.
Reference values you can check by hand
Verified pairs across the three bases
DecimalHexadecimalBinary
000
10a1010
255ff11111111
4294967295ffffffff32 ones
18446744073709551615ffffffffffffffff64 ones
9007199254740993200000000000011, then 52 zeros, then 1

Frequently asked questions

Why is 9007199254740993 in hex 20000000000001 and not 20000000000000?

9007199254740993 is 253 + 1. Converters that compute through double-precision floating point cannot represent that value and silently round it down to 253, printing 20000000000000. This tool uses arbitrary-precision integers, so the answer keeps the final 1.

Does it handle numbers larger than 64 bits?

Yes — up to 4096 input digits, well past the 64-bit range. The 64-bit boundaries 9223372036854775807 and 18446744073709551615 are just ordinary values here. Note that a leading - is a mathematical sign, not a two's-complement bit pattern.

Can it convert decimal fractions or floating-point numbers?

No. Fractions, exponents and IEEE-754 interpretation are out of scope; such input is rejected with an explicit error rather than truncated.

Which input formats are accepted?

An optional leading + or -, then digits for the selected base. 0x is accepted in the hex field and 0b in the binary field. Surrounding whitespace is ignored; separators such as commas or underscores inside the number are rejected.

Privacy

Everything runs in this page. Your numbers are not sent anywhere, not stored, and not logged — there is no analytics, no cookies and no third-party code on this prototype.