Number Base Converter
Convert whole numbers between binary (base 2), octal (8), decimal (10), hexadecimal (16) or any base up to 36.
–
Decimal
- Binary
- Octal
- Decimal
- Hexadecimal
- Custom base
- Bits needed
- Work
Saved Calculations
Items you add are saved in this browser.
| Name | Calculation | Result | Remove |
|---|
How Number Bases Work
In base b, each place is worth b times the place to its right. To convert to decimal, multiply each digit by b raised to its place number (counting from 0 on the right) and add. To convert from decimal, divide by b repeatedly and read the remainders from last to first.
Value = Σ digit × b^place Digits: 0–9, then A = 10 … Z = 35
Worked Example
Tips
One hex digit is exactly 4 binary digits, which is why programmers use hex. Prefixes like 0x (hex), 0b (binary) and 0o (octal) are ignored. Whole numbers only; very large numbers are handled exactly.