Decimal to Binary Converter

Type a Decimal number and get Binary instantly — plus every other base at the same time.

Every base updates as you type; click bits to toggle them. Digit separators (_, spaces) are allowed. In two's complement mode the binary/octal/hex rows show the bit pattern and the decimal row shows the signed value. Choose Text to convert ASCII/UTF-8 text to bytes in any base — or bytes back to text.

How to convert Decimal to Binary

To convert decimal to binary, divide the number by 2 repeatedly, writing down the remainder each time, until the quotient reaches zero. The remainders, read from the last to the first, are the binary digits.

Worked example

Convert 1958 (decimal) to binary:

  1. 1958 ÷ 2 = 979, remainder 0
  2. 979 ÷ 2 = 489, remainder 1
  3. 489 ÷ 2 = 244, remainder 1
  4. 244 ÷ 2 = 122, remainder 0
  5. 122 ÷ 2 = 61, remainder 0
  6. 61 ÷ 2 = 30, remainder 1
  7. 30 ÷ 2 = 15, remainder 0
  8. 15 ÷ 2 = 7, remainder 1
  9. 7 ÷ 2 = 3, remainder 1
  10. 3 ÷ 2 = 1, remainder 1
  11. 1 ÷ 2 = 0, remainder 1
  12. Read the remainders bottom-up: 11110100110

So 1958 in decimal is 11110100110 in binary.

Decimal to Binary conversion table

DecimalBinary
00
11
210
311
4100
5101
6110
7111
81000
91001
101010
111011
121100
131101
141110
151111

Frequently asked questions

Can this handle numbers larger than 64 bits?
Yes. Conversion runs on arbitrary-precision integers, so numbers of any length convert exactly. Many online converters silently lose precision above 2⁵³ (about 16 decimal digits) — this one doesn't.
How do I convert negative numbers?
A leading minus sign works in every base. For the bit-pattern view programmers usually want, switch the mode to two's complement at 8, 16, 32, or 64 bits — then binary, octal, and hex show the bit pattern while decimal shows the signed value.
Can I convert the other way, or to other bases?
Use the Binary to Decimal converter, or just change the From/To dropdowns above — every common base is shown at once anyway, and a Text mode converts ASCII to bytes and back.

Need arithmetic rather than conversion — adding hex numbers, shifting bits, masking? Use the programmer's calculator.