FileToolsHub logo

Binary to Decimal

Binary to Decimal turns a string of 0s and 1s into a base-10 number. Spaces are removed first. Any other character stops the conversion.

Spaces would be removed first. A digit other than 0 or 1 is rejected.
1101
13

Processing: runs in your browser, nothing uploaded

About Binary to Decimal

Digits 0 and 1 only

The input must match 0, 1, and spaces. Anything else, including 2, a letter, or a 0b prefix, stops with Enter binary digits only. Spaces are removed, then the remaining digits are read as base 2. 1101 is 13. 11 01 is also 13, because the space is ignored. An empty box fails the digit test and shows the same error. The result is a base-10 string. There is no bit-width padding on the way out. This is the reverse of a number conversion, not the reverse of Binary Converter. Binary Converter expands letters into eight-bit groups. Pasting those groups here can exceed a safe integer and will not rebuild the letters.

Place value from the right

The rightmost bit is 1, then 2, then 4, then 8. 1101 is 8 plus 4 plus 0 plus 1, which is 13. You can check a short value that way before you trust a long one. Leading zeros do not change the number. 00001101 is still 13. The tool does not print the place-value table. It only prints the total. A string longer than the safe integer range is still parsed, and the last digits can be wrong because JavaScript cannot hold every integer past 2^53 minus 1. Split a very long bit string or use a big-integer tool if you need every digit exact.

What belongs on another page

Decimal to Binary starts from a base-10 number and prints bits. Decimal to Hex and Hex to Decimal are base 16. A color written as FF is hex, and this page will reject the letter F. Do not paste Hi here. Those letters fail the digit test on purpose. If your notes mix a space between every bit, that is allowed. If your notes mix a comma, remove the commas first. The error does not list the bad character. It only says to enter binary digits.

A worked check

Type 1101 and run it. The line should read 13. Type 1111 and the line should read 15. Type 100000 and the line should read 32. If 100000 comes back as something else, you included a character that is not 0 or 1, or the box did not run. Type 2 and you should see Enter binary digits only. That error is the guard in the converter, not a generic failure. The bits stay on this device. 1111 is 15, and 100000 is 32. If those two checks match, longer classroom values use the same rule. A comma between bits is not a space, so remove commas first. Stay under the safe integer limit when every digit has to be exact.

How to use

  1. 1

    Paste digits 0 and 1. Spaces are allowed.

  2. 2

    Run the conversion.

  3. 3

    Read the base-10 number. A short value such as 1101 should show 13.

Privacy

The bit string is converted in this browser and is not uploaded.

Frequently asked questions

What does 1101 become?

13. The same digits with a space, 11 01, are also 13 because spaces are removed.

Why was my input rejected?

The only allowed characters are 0, 1, and spaces. Anything else, including 2 or a 0b prefix, shows Enter binary digits only.

Do leading zeros matter?

No. 00001101 is still 13.

Can a very long bit string be wrong?

Past the safe integer limit, 2^53 minus 1, low digits can be inaccurate. Keep classroom values short of that.

Will this rebuild the word Hi?

No. This page totals bits. It does not turn eight-bit groups back into letters.

Browse all Text Tools · Sitemap