What you can do with Number Base Converter
- Convert binary to decimal
- Hex to decimal
What this conversion does
Convert signed integer values between binary, octal, decimal, and hexadecimal with exact arbitrary-precision arithmetic.
Example input
110101101111000100101Example output
Decimal: 1760805, Hex: 1ADDE5, Octal: 6556745Practical workflow
- Enter an integer using the digits allowed by the selected source base: 0–1, 0–7, 0–9, or 0–9 and A–F.
- Choose Binary, Octal, Decimal, or Hexadecimal in the From Base menu; the four result cards update as you edit.
- Use a leading minus sign for a negative integer; each result keeps signed notation.
- Copy the result for the target representation, including its 0b, 0o, or 0x prefix where shown.
Common use cases
- Calculating bitmasks and bitwise flag combinations for systems programming.
- Translating memory address pointers and hardware registers.
- Configuring UNIX file permissions (chmod octal math).
Important notes and limitations
- Input is limited to 4,096 characters to bound conversion work; values are parsed with BigInt to avoid floating-point rounding.
- The page offers four fixed bases and signed minus notation. It has no custom-base selector or fixed-width two's-complement mode. The number and selected source base stay in tab memory and clear on reload.
CLI number base conversion (Binary, Octal, Decimal, Hex)
Base conversion via Linux bc calculator
echo 'obase=16; ibase=2; 11010110' | bcConverts binary 11010110 into hexadecimal D6 using arbitrary-precision arithmetic.
Base conversion with printf in bash
printf 'Dec: %d | Hex: 0x%X | Oct: 0%o
' 255 255 255Formats integer values across decimal, uppercase hexadecimal, and octal representations.
Integer overflow & base parsing troubleshooting
Precision loss / Integer overflow beyond 2^53 - 1
Cause: JavaScript Number type is IEEE-754 double precision float, losing integer precision above 9,007,199,254,740,991.
Solution: Use BigInt ('9007199254740993n') for 64-bit or 128-bit base conversions to preserve exact bits.
Invalid character for specified radix (NaN result)
Cause: Supplying characters outside the valid digit set (e.g. digit '8' in octal base 8, or 'G' in hex base 16).
Solution: Validate that all characters in the string fall strictly within the 0 to (radix - 1) symbol range.
Continue your workflow
- Binary Tool — convert text to binary and inspect individual bit representations.
- Hex Tool — convert arbitrary text strings to hex byte arrays.
- Chmod Calculator — Calculate octal and symbolic Linux file permissions.
Frequently asked questions
How large can a number be in the Number Base Converter?
The input accepts up to 4,096 characters, including an optional leading minus sign. BigInt arithmetic preserves integer precision within that limit.
How does the Number Base Converter represent negative integers?
Enter a leading minus sign and the output cards keep signed notation, such as -0x7F. The page does not produce fixed-width two's-complement output.
Can I select a custom radix in the Number Base Converter?
The page exposes four source choices—binary, octal, decimal, and hexadecimal—and always displays those four outputs. It has no custom-radix control.