Skip to content

Binary to decimal converter

Binary to decimal, exact at any length — plus hex and octal.

Runs in your browser — files never leave your device
Input base:
Binary11111111
Octal377
Decimal255
Hexadecimalff

Convert binary numbers to decimal exactly

Paste a binary number of any length and its decimal value appears immediately, along with hexadecimal and octal. The conversion uses JavaScript's BigInt, so a 128-bit mask or a long bit string converts exactly — ordinary JavaScript numbers lose precision after 53 bits, which is where many online converters quietly start rounding.

How binary to decimal works

Each binary digit is worth twice the one to its right: 1, 2, 4, 8, 16, and so on. Multiply each digit by its place value and add them up:

101101 = 1×32 + 0×16 + 1×8 + 1×4 + 0×2 + 1×1 = 45.

A quick check: eight ones, 11111111, is 255 — the largest value in a byte. Every additional bit doubles the range, so n ones always equal 2n − 1.

Hexadecimal is a shorthand for binary: each hex digit stands for exactly four bits, which is why 11111111 is ff. For that direction see hex to decimal.

Other conversions with this tool

How to convert binary to decimal

  1. 1

    Type or paste a binary number.

  2. 2

    Read the decimal value in the table.

  3. 3

    Copy any result with one click.

Binary to Decimal — frequently asked questions

How do you convert binary to decimal by hand?

Multiply each digit by its power of two and add them up. For 1011: 1×8 + 0×4 + 1×2 + 1×1 = 11.

Is there a length limit?

No practical one. Conversion uses JavaScript BigInt, so numbers far beyond 64 bits stay exact instead of being rounded.

Can I paste a 0b prefix or underscores?

Yes. A 0b prefix and underscore separators are ignored, so 0b1111_0000 works as-is. Remove any spaces first.