Binary to Decimal Converter: Fast, Easy, and Fun

Binary is base 2: every digit is either 0 or 1, and each position represents a power of 2 instead of a power of 10. To read a binary number as decimal, you add up the powers of 2 for every position that holds a 1.

Worked example: 10101

Take the binary number 10101. Reading right to left, the digit positions are worth 1, 2, 4, 8, and 16:

Position value168421
Digit10101

Adding the positions that hold a 1: 16 + 4 + 1 = 21. That's exactly what this converter returns for 10101, since it calls JavaScript's parseInt(value, 2) under the hood, which does the same base-2 summation.

Input rules

The field only accepts 0s and 1s — the regex check /^[01]+$/ runs before anything is converted. Type any other character, including spaces or a leading "0b" prefix, and the tool asks you to re-enter a valid binary number rather than silently producing a wrong result.

Where this comes up

Binary-to-decimal conversion shows up when reading raw memory dumps, IP subnet masks, permission flags (like Unix chmod values), or debugging register values on embedded systems where tools display state as a bit string.