Binary / Decimal / Hex Converter
Convert a whole number exactly between binary, decimal and hexadecimal.
Result
- Decimal
- Binary
- Hexadecimal
How it works
This tool converts a whole number between binary, decimal, and hexadecimal exactly, using arbitrary-precision arithmetic. It never passes the value through ordinary floating-point numbers, so results stay exact even far beyond the size a standard JavaScript number can represent precisely.
Negative numbers are shown as an ordinary signed value (for example, decimal -10 converts to binary -1010 and hexadecimal -A). This is not two's-complement bit-width representation, which would require choosing a fixed bit width that has no natural meaning for a number of unlimited size. Hexadecimal output always uses uppercase A–F; hexadecimal input accepts either case. Input is limited to a generous 1,000 characters to keep the page responsive.
What this result means
The result is your number converted exactly between binary, decimal and hexadecimal.
Examples
- 26 (decimal): binary 11010, hexadecimal 1A
Assumptions and limitations
- Whole numbers only, with an ordinary minus sign for negatives — not two's complement.
- No octal, and no 0x or 0b prefixes on input or output. Hexadecimal output is always uppercase.