Convert binary to decimal instantly
Paste or type any binary number above and get the decimal result in one click. The converter also shows the value in octal and hexadecimal at the same time, so you see the full picture without running separate conversions.
Everything runs in your browser. Nothing is sent to a server, so paste away with confidence — your data stays private.
How to use it
- Type or paste your binary number (e.g.
11010110) into the input field above. - The decimal equivalent appears immediately — no button to click.
- Copy the result or check the other bases shown alongside it.
Worked example: binary to decimal conversion
Let's convert 11010110 (binary) to decimal by hand so you can see exactly what's happening.
Each digit (called a bit) represents a power of 2. Working right to left, the positions are 2⁰, 2¹, 2², 2³, and so on.
| Bit position | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|
| Bit value | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
| Power of 2 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Contribution | 128 | 64 | 0 | 16 | 0 | 4 | 2 | 0 |
Add the contributions: 128 + 64 + 16 + 4 + 2 = 214
So 11010110₂ = 214₁₀ in decimal. The converter above gets you there in under a second, no matter how many bits are involved.
Quick reference: common binary values
| Binary | Decimal | Hex |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 1010 | 10 | A |
| 1111 | 15 | F |
| 11010110 | 214 | D6 |
| 11111111 | 255 | FF |
| 100000000 | 256 | 100 |
How to convert binary to decimal in code
If you're working in a script rather than the browser, here are the one-liners you need.
Python
# Python: convert a binary string to decimal
binary_str = '11010110'
decimal_value = int(binary_str, 2)
print(decimal_value) # 214int(value, base) is the built-in way to parse any base — no import needed.
JavaScript
// JavaScript: convert a binary string to decimal
const binaryStr = '11010110';
const decimalValue = parseInt(binaryStr, 2);
console.log(decimalValue); // 214parseInt accepts a radix (base) as its second argument, so passing 2 treats the string as binary.
How it works under the hood
The converter applies the standard positional notation algorithm defined in the IEEE and described in the ECMAScript spec for parseInt. Each bit is multiplied by 2 raised to its position index, and the products are summed.
The tool handles very large binary numbers — far beyond the 32-bit limit of parseInt — by using JavaScript's BigInt internally, so leading zeroes are ignored and there's no overflow.
When to use this converter — and when not to
- Use it when reading low-level output: CPU registers, network protocol bit fields, embedded device dumps, or error codes in binary.
- Use it when debugging bit-masking logic and you need to cross-check a value across binary, decimal, and hex at a glance.
- Skip it if you're working with signed integers in two's complement notation — a negative binary value like
10000001reads as 129 in unsigned decimal, not −127. You'd need a dedicated two's complement tool for that. - Skip it for floating-point binary (IEEE 754) — patterns like
01000001001000000000000000000000represent a float, not a plain integer.
The tool is completely free and requires no sign-up — open the page and start converting.
Ready to go? Drop your binary string into the converter at the top of the page and get your decimal answer instantly.