Binary to Decimal Converter

Convert Binary to Decimal instantly in your browser.

0 characters

0 characters

Everything is converted in your browser. Nothing you paste is uploaded or stored.

Worked example

Each row shows a short sample written as Binary, and the same value converted to Decimal.

Binary input Decimal output
01001000 01101001 72 105
01010011 01000111 83 71
01110100 01101111 01101111 01101100 116 111 111 108

In-depth guide

Binary to decimal: place values, the doubling method and what this converter accepts

How to read a binary number as decimal by hand, worked examples checked with the converter, and the exact rules for the 0 to 255 groups the tool accepts.

Last verified: Sources: MDN parseInt Plain-text version of this guide

Key figures at a glance

Bit weights in one byte
128 · 64 · 32 · 16 · 8 · 4 · 2 · 1
Each position is worth twice the one to its right.
Largest group the tool accepts
11111111 = 255
Every group of binary digits is treated as one byte, so a group above 255 is rejected.
How groups are split
Separated by spaces, commas, semicolons, colons, underscores or hyphens; one unbroken run is cut every 8 digits
Same conversion in JavaScript
parseInt("11010110", 2) returns 214
Source: MDN parseInt

Reading a binary number by hand

Two equivalent methods; use whichever you find easier to check.

  1. Step 1: Write the weights under the digits

    Start at the right with 1 and double each step to the left: 1, 2, 4, 8, 16, 32, 64, 128.

  2. Step 2: Add the weights where the digit is 1

    Ignore the positions that hold 0. The total is the decimal value.

  3. Step 3: Or double as you read left to right

    Start at 0. For each digit, double the running total and add the digit. This avoids writing weights.

  4. Step 4: Confirm with the converter

    Paste the digits into the tool. A mismatch usually means a weight was misplaced.

Positional notation in base 2

In decimal, the digits of 214 mean 2 hundreds, 1 ten and 4 ones: each place is ten times the one on its right. Binary uses the same idea with two as the multiplier. The only digits are 0 and 1, and the places are worth 1, 2, 4, 8, 16, 32, 64, 128 and so on. A 1 switches that weight on, a 0 switches it off.

For 11010110 the weights that are switched on are 128, 64, 16, 4 and 2, and 128 + 64 + 16 + 4 + 2 = 214.

Worked examples

Binary Weights switched on Decimal
1101 8 + 4 + 1 13
101010 32 + 8 + 2 42
1100100 64 + 32 + 4 100
11010110 128 + 64 + 16 + 4 + 2 214
00110011 32 + 16 + 2 + 1 51
11111111 all eight weights 255

All six values were produced by running the converter's own code. Leading zeros do not change the value, so 00110011 and 110011 are both 51.

What this converter accepts

  • Each group is one byte, so the largest valid group is 11111111 (255). A group of nine or more digits that sits among other groups, such as 111111111 1, is reported as out of range.
  • Several groups give several numbers: 1111 0000 10101010 becomes 15 0 170.
  • One unbroken run is cut every 8 digits, so 1111000010101010 becomes 240 170. A run longer than 8 digits that is not a multiple of 8, such as nine digits in a row, is rejected with a length message.
  • Only 0 and 1 are valid digits. Input such as 13 is rejected.
  • There are no fractions and no prefix: 0b101 is rejected because of the b. A minus sign counts as a separator, not as a negative sign.
  • Output is plain decimal, one number per input group, separated by a single space.

Tip: To convert a long binary number, break it into groups of up to 8 digits and convert each; then combine the pieces by hand with powers of 2 (the second group is multiplied by 256 for each group to its right).

Common mistakes

  • Reading the weights from the left. The rightmost digit is worth 1, not the leftmost.
  • Treating the result as signed. The tool always returns an unsigned value, so 11111111 is 255. As a signed 8-bit number in two's complement it would mean -1, but that is a different interpretation of the same bits.
  • Pasting a 0b prefix. Remove it first; the converter only accepts the digits.
  • Forgetting that spaces split bytes. 1010 0101 is two numbers (10 and 5), not one number 165.

Frequently asked questions

Is my data sent anywhere?

No. The conversion runs entirely in your browser using JavaScript. Nothing you paste leaves your device, is logged, or is stored.

How should I separate values?

Spaces work, and so do commas, colons and semicolons. For binary, hex and octal you can also paste a single unbroken run of digits — it is split into bytes automatically.

Does it handle emoji and non-English text?

Yes. Text is treated as UTF-8, so accented characters, Chinese, Tamil and emoji all convert correctly. They simply take more than one byte each.

Why did I get an error?

The input contained a character that is not valid for the source format, a value above 255, or a run of digits that does not divide evenly into bytes. The message names the specific token so you can find it.

Sources

  1. MDN: parseInt() — Parsing a string in radix 2 to 36.
  2. MDN: Number.prototype.toString() — The reverse direction, radix 2 to 36.

This guide explains published rules in plain language. It is not financial, legal or official advice — rules change, so confirm with the agency linked above before you commit.

Related converters

Embed this tool on your website

Free to use. Paste this code into your page and keep the link back to ToolSG.