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. 0xprefixes hexadecimal input,0bprefixes binary input. Decimal input takes no prefix, so0x10there 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
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.
Reference values you can check by hand
| Decimal | Hexadecimal | Binary |
|---|---|---|
| 0 | 0 | 0 |
| 10 | a | 1010 |
| 255 | ff | 11111111 |
| 4294967295 | ffffffff | 32 ones |
| 18446744073709551615 | ffffffffffffffff | 64 ones |
| 9007199254740993 | 20000000000001 | 1, 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.