# Convert Binary to Decimal

> Convert binary numbers to decimal online. Free binary to decimal converter with a worked example — base 2 to base 10, one value per line.

Reading a binary literal, a bitmask, or a register value usually means working out its decimal value. This converter turns base-2 numbers into plain base-10 integers, accepting an optional 0b prefix.

## Example: Binary → Decimal

Input:
```
10
1010
101010
11111111
```

Output:
```
2
10
42
255
```

## How to convert Binary to Decimal

1. Take your binary value, e.g. 1010.
2. Multiply each bit by 2 raised to its position, right to left.
3. Sum the results — 1010 becomes 8 + 0 + 2 + 0 = 10.

## FAQ

### Does it accept a 0b prefix?

Yes. A leading 0b is stripped automatically, so both 1010 and 0b1010 convert to 10.

### What if I enter non-binary digits?

Only 0 and 1 are valid. Any other character makes the value invalid, and the converter flags that line.

## Related converters

- [Decimal → Binary](https://www.devkult.com/convert/decimal-to-binary.md)
- [Hex → Decimal](https://www.devkult.com/convert/hex-to-decimal.md)
- [Decimal → Hex](https://www.devkult.com/convert/decimal-to-hex.md)

Open the interactive converter: https://www.devkult.com/convert/binary-to-decimal