Binary to Decimal Converter
Convert base-2 and base-10 in both directions, with a live per-bit view plus hex and octal. Binary input accepts only 0 and 1.
Convert base-2 and base-10 in both directions, with a live per-bit view plus hex and octal. Binary input accepts only 0 and 1.
To convert a binary (base-2) number to decimal (base-10), add up the place values of every digit that is a 1. Reading right to left, the columns are 1, 2, 4, 8, 16, 32 and so on — each twice the one before. The per-bit cells above light up green for every 1, so you can see which place values are being summed.
For example, 101010 has 1s in the 32, 8 and 2 columns: 32 + 8 + 2 = 42. Type into either box and the other updates instantly — the binary field accepts only 0 and 1, and the decimal field only digits 0–9.
| Binary | Decimal | Hex |
|---|---|---|
| 1 | 1 | 0x1 |
| 10 | 2 | 0x2 |
| 100 | 4 | 0x4 |
| 1000 | 8 | 0x8 |
| 1010 | 10 | 0xA |
| 101010 | 42 | 0x2A |
| 11111111 | 255 | 0xFF |
The same value is shown in hexadecimal (base-16, prefixed 0x) and octal (base-8, prefixed 0o) below the inputs. Hex packs four binary digits into a single character, which is why colour codes and memory addresses use it. Octal groups three bits at a time and still appears in Unix file permissions. All four views describe the exact same number — only the base differs.
Add the place values of each 1: 101010 has 1s in the 32, 8 and 2 columns, so 32 + 8 + 2 = 42. The per-bit cells above show this visually.
Binary is base-2, so only the digits 0 and 1 are valid. Any other character is stripped automatically as you type. The decimal box likewise accepts only 0–9.
They label the base: 0x marks a hexadecimal (base-16) number and 0o marks an octal (base-8) number. They are conventions used by most programming languages.
Yes — this converter is two-way. Type a number into the Decimal box and its binary form appears above, with the bit cells and hex/octal views updating too.
People reach this tool searching for: