Shard Tools

Binary to Decimal

Convert a binary number to decimal in your browser, with full precision for large values.

Maintained by Roshan.

Use Binary to Decimal

Converts binary number to decimal in this tab, with nothing sent anywhere.

Runs entirely on your deviceThe conversion happens in this browser tab. Nothing you type is uploaded, logged or stored, which is worth knowing for anything you would not paste into a search box.

Explore developer and data tools

Find related browser-local tools for nearby tasks without starting another search.

Browse all developer and data tools

About Binary to Decimal

Reading a binary number back into decimal answers the question a row of ones and zeros always raises: how big is it, really. Binary is excellent for seeing which bits are set and hopeless for grasping magnitude at a glance, so converting to decimal is how you translate a bit pattern into a size a person can reason about. This comes up whenever you are handed a value in binary - from a datasheet, a protocol specification, a register dump - and need its ordinary numeric value. The precision point holds here too: a long binary value can represent a very large number, and a converter that accumulates it in an ordinary floating-point variable loses the low digits once it grows past the safe integer range. Arbitrary-precision integers throughout keep the result exact.

Using Binary to Decimal

  1. The binary digits are read into an arbitrary-precision integer, so a long value converts without any loss of precision.
  2. Spaces and separators are ignored, so a byte-grouped binary dump converts as readily as an unbroken string.
  3. Each bit contributes its power of two, accumulated exactly from the most significant to the least.
  4. The output is the plain decimal number.
  5. Only zeros and ones are accepted; any other character is refused as an error.

Where binary to decimal helps

Sizing a bit pattern

A binary value from a datasheet converts to the decimal number it stands for, which is far easier to compare and reason about.

Checking a manual conversion

Convert a binary number here and compare with your own working to confirm the place values add up.

Before you use the result

Questions about Binary to Decimal

Does grouping into bytes matter?

No. Spaces are ignored, so byte-grouped and run-together binary both convert. Grouping only matters when decoding text.

Is it exact for long values?

Yes. Arbitrary-precision integers mean even a 64-bit binary value converts without rounding.

Is this binary to text?

No. This gives a number's decimal value; binary to text decodes bytes into characters.

What if there is a stray character?

Anything other than 0 or 1 is refused, so a typo is caught rather than silently altering the answer.

Related tools

Decimal to Binary

Convert a decimal number to binary in your browser, with full precision for large values.

Hex to Decimal

Convert a hexadecimal number to decimal in your browser, with full precision for large values.

Binary to Text

Convert binary back to readable text in your browser, decoding the bytes as UTF-8.