TOP

Free exact browser converter

Binary to Decimal Converter

Convert binary integers to decimal online with exact BigInt arithmetic. Accept optional 0b prefixes and grouped bits while rejecting signs and invalid digits.

No signupRuns locally in your browser

Interactive tool

Convert Binary to Decimal

Ready

Output format

Choose a clear output representation.

Detailed conversion guide

How to Convert Binary to Decimal

Each bit contributes its value times a power of two. Binary 111011 is 1×32 + 1×16 + 1×8 + 0×4 + 1×2 + 1×1, giving decimal 59.

BigInt parses the validated bits as one exact non-negative integer. Grouping spaces and underscores do not create separate values. Leading zero bits do not change the decimal result.

InputOutputMeaning
00zero
101010decimal 10
11101159decimal 59
11111111255decimal 255

Binary to Decimal without Floating-Point Loss

The algorithm validates the representation before exact integer conversion, so malformed input never produces a plausible partial answer.

const bits = input.trim().replace(/^0b/i, "").replace(/[\s_]/g, "");
if (!/^[01]+$/.test(bits)) throw Error("Invalid binary integer");
const decimal = BigInt("0b" + bits).toString(10);

Invalid Bits, Fractions, and Signed Interpretation

Digits other than 0 and 1, repeated prefixes, decimal points, and signs are rejected. This page does not infer two’s-complement width: 11111111 is decimal 255, not −1.

Grouped bits are joined into one number. A fractional input such as 0.1 needs a binary-fraction converter and is unsupported here. BigInt keeps large values exact, including values beyond 2^53 − 1.

Related converters

Choose the converter for the input and output formats you are working with.

Advertisement

Sponsored link