Binary to decimal converter
Convert a number between any two number bases.
Runs in your browser. Nothing you type is sent anywhere.
- Bases 2 to 36
- Exact for huge numbers
- Works offline
How to convert between number bases
- Pick the base your number is written in.
- Type the number.
- Read the result in binary, octal, decimal and hex at once.
Common number bases
| Base | Name | Digits used |
|---|---|---|
| 2 | Binary | 0-1 |
| 8 | Octal | 0-7 |
| 10 | Decimal | 0-9 |
| 16 | Hexadecimal | 0-9, A-F |
| 36 | Base 36 | 0-9, A-Z |
Example: the number 255 in every base
| Base | Written as |
|---|---|
| Binary | 11111111 |
| Octal | 377 |
| Decimal | 255 |
| Hex | FF |
Where different bases show up
- Hex for colors, memory addresses and byte values in programming.
- Octal for legacy Unix file permissions, such as chmod 755.
- Higher bases like 32 or 36 for compact identifiers, since more values fit into fewer characters.
- Binary for understanding exactly how a computer stores a number.
- Base64 for packing binary data into text, which is a different scheme from a plain base conversion and is covered by this site's Base64 encode and decode tools instead.
Bitwise facts worth knowing
- The number of trailing zeros in a binary value tells you how many times it divides evenly by 2, a quick way to check alignment in low-level code.
- Flipping every bit in a binary number and adding 1 gives its two's complement negative, which is how most computers represent negative integers internally.
- Each hex digit maps to exactly 4 binary digits, which is why hex is used as a shorter, still-exact stand-in for long binary values.
Binary to decimal FAQ
Can it handle very large numbers?
Yes. It uses arbitrary-precision math, so numbers with dozens of digits convert exactly, with no rounding.
What counts as a valid digit above base 10?
Letters a through z stand for digits 10 through 35, so base 16 uses 0-9 and a-f, and base 36 uses every letter.
Why is my result 0?
The input probably contains a character that is not a valid digit in the base you chose. Double-check the base first.
What is the highest base this supports?
Base 36, using digits 0-9 and letters a through z. Pick Custom to enter any base from 2 to 36.
Can it convert negative numbers?
No. Enter only the digits, without a minus sign. This converter handles whole, non-negative numbers.
How do Unix file permissions like chmod 755 relate to octal?
Each octal digit packs 3 permission bits (read, write, execute) for owner, group and others, so 755 means read, write and execute for the owner and read and execute for everyone else.
Can it convert a number with a decimal point?
No. Only whole numbers convert here, since a decimal point is not a valid digit in any base and makes the whole input invalid.
What is the largest number this can handle?
There is no practical limit. It uses BigInt arithmetic internally, so a 50-digit number converts exactly, with no rounding or loss of precision.