Decimal to binary converter

Type a decimal number and see its binary form right away, grouped in blocks of four bits. Negative numbers can be shown in two's complement and fractions are converted too.

Free and private. Everything runs in your browser, nothing is uploaded.

How it works

  1. Type the numberEnter the value in the input box. Spaces and underscores between digits are ignored.
  2. See the resultThe converted value appears right away, together with the other common bases.
  3. Copy itPress Copy next to the result you need.

From decimal to binary

To convert by hand, divide the number by 2 and keep the remainder, then repeat with the result until you reach 0. Reading the remainders backwards gives the binary number. For 2026 that is 11111101010. The converter does this for numbers of any length and shows the bits in groups of four, which makes them easy to read and to compare with hex.

For a negative number, turn on Signed and pick a width such as 8, 16 or 32 bits to get the two's complement pattern a processor stores. A fraction such as 0.625 becomes 0.101; values like 0.1 repeat forever in binary, and the repeating part is shown in brackets.

Frequently asked questions

How many bits does a number need?

As many as the length of its binary form: 255 needs 8 bits, 256 needs 9. The bit view below the results shows the number padded to whole bytes.

How do I convert decimal to binary by hand?

Divide the number by 2 again and again and write down the remainders, then read them from the last to the first. For 13: 13, 6, 3, 1 give remainders 1, 0, 1, 1, so 13 is 1101.

Why does 0.1 never end in binary?

Because 1/10 cannot be written as a sum of powers of two, just as 1/3 never ends in decimal. The repeating part 0011 is shown in brackets.

What is the largest number I can convert?

Numbers with up to 20,000 digits are accepted. The results are exact, there is no rounding.

Is anything sent to a server?

No. All calculations happen in your browser.