Number Base Converter
Convert between binary, octal, decimal, hexadecimal and any base from 2 to 36.
Formula
positional notation: Σ digitᵢ × baseⁱ
Tips
- Prefixes are stripped automatically: 0b1010, 0xFF and 0o777 all work.
- Each hex digit is exactly four binary digits, which is why hex is the convention for reading raw bytes.
- Bases above 16 use letters up to Z. Base 36 is the highest that fits in digits plus the Latin alphabet.
Frequently asked questions
Why does my long binary string lose precision?
JavaScript numbers are exact only up to 2⁵³. Beyond about 53 bits the value cannot be represented precisely, so the tool refuses rather than returning a quietly wrong answer.