Binary to Decimal Converter

Convert binary (base 2) numbers to decimal.

Binary
Decimal
Runs locally in your browser

About the Binary to Decimal Converter

This tool reads binary numbers and converts them to ordinary decimal, using arbitrary-precision arithmetic so long bit strings convert exactly. Convert several at once with one per line. Spaces within a binary number are ignored, so grouped input works.

It is the counterpart to Decimal to Binary and useful for interpreting bit patterns, flags and low-level data. For every base at once, use the All Base Converter.

The maths is positional: each 1 contributes two raised to the power of its distance from the right-hand end, and those contributions are added. So 101010 is 32 plus 8 plus 2, which is 42. Counting positions from zero on the right is the habit worth building, because it matches the way shift amounts and bit indexes are written in almost every language.

Leading zeros never change the value, so 00001010 and 1010 both give 10; they only record the field width somebody had in mind. Underscores and spaces are stripped as well, so a grouped literal such as 1010_1010 pasted out of source code converts without editing. Because the arithmetic runs in big integers, a 64-bit register dump comes back as an exact figure rather than a rounded float, which matters as soon as the value passes 2 to the 53rd. Typical work is decoding a status register or a permission bitmask out of a log. When the bits are really encoded characters, Binary to Text decodes them.

How to use

  1. Paste binary numbers, one per line.
  2. Copy the decimal results.
  3. Grouped binary with spaces is accepted.

Common questions

Can I paste grouped binary like 1010 1010?
Yes, spaces are ignored so grouped input converts fine.
Does it handle long bit strings?
Yes, with arbitrary precision.
What if there is a non-binary digit?
It is reported as an invalid digit for that base.