Decimal to Binary

Enter any whole number and get its binary form instantly, with the classic divide-by-2 steps written out. Free and private โ€” everything is computed locally in your browser.

Whole numbers only. A leading minus sign and commas, spaces or underscores as thousands separators are accepted.

How to use the Decimal to Binary converter

  1. Type a decimal number. Enter any whole number โ€” commas and spaces as thousands separators are fine, and a minus sign makes it negative.
  2. Get the binary instantly. The base-2 result appears as you type, optionally grouped into 4-bit nibbles for easy reading, along with hex and octal forms.
  3. Follow the steps or copy. The division table shows the repeated divide-by-2 method used in class; the copy button grabs the plain binary string.

About this tool

Converting decimal to binary is the classic first exercise in computer science: repeatedly divide the number by 2 and collect the remainders, then read them in reverse order. For example, 13 โ†’ 6 r 1 โ†’ 3 r 0 โ†’ 1 r 1 โ†’ 0 r 1 gives 1101. This decimal to binary converter performs that algorithm instantly and displays every division step, so you can check homework, prepare bitmasks, size storage fields or understand how integers are represented in memory. Arbitrary-precision math means numbers far beyond the 64-bit limit convert exactly.

All processing happens locally in your browser; the values you enter are never uploaded or logged. For the reverse direction try the Binary to Decimal converter, or use the Number Base Converter to reach octal, hex or any base up to 36.

Frequently asked questions

How do you convert decimal to binary by hand?

Divide the number by 2 and write down the remainder (0 or 1). Divide the quotient by 2 again, and repeat until the quotient reaches 0. The binary number is the list of remainders read from last to first โ€” exactly what the steps table on this page shows.

Does this tool convert fractions or only whole numbers?

It converts integers only. Fractional decimal values need a different method (repeated multiplication by 2 for the fractional part) and often produce infinitely repeating binary expansions, so they are out of scope for this converter.

How are negative numbers shown?

With a minus sign in front of the binary digits (sign-magnitude form), e.g. -13 โ†’ -1101. Computers usually store negatives as two's complement instead, which depends on a fixed bit width, so it is not shown here.

Why group the bits in 4s?

Each group of 4 bits (a nibble) corresponds to exactly one hexadecimal digit, so grouping makes long binary strings much easier to read and to translate to hex. The copy button always copies the ungrouped digits.