Decimal to binary converter

Type a decimal number and get its binary value instantly, together with binary, decimal, hexadecimal and octal, the bit count and a copy button. Free, in your browser.

  • Free
  • No sign-up
  • Runs in your browser
decimal-to-binary

Fill in the values above to see the result.

100% private — the calculation is done in your browser and nothing is sent to any server.

How it works

Enter the number

Type a decimal number in the box; the base is already selected.

Read the result

Binary, decimal, hexadecimal, binary and octal appear together.

Copy it

Use the copy button next to the value you need.

How to convert decimal to binary

To convert decimal to binary, type your number in the converter above and read the binary value. For example, 214 in decimal is 1101 0110 in binary. The other bases are shown at the same time.

Why convert decimal to binary

Turning decimal into binary is what you do when you set flags, write a bitmask, prepare a subnet or learn how computers store numbers. The number 214 becomes 11010110, which shows at a glance which bits are on and which are off.

Convert decimal to binary by hand

Here is 214 (decimal) converted step by step:

  1. Divide the number by 2 repeatedly and note each remainder: 214 ÷ 2 = 107 remainder 0, 107 ÷ 2 = 53 remainder 1, 53 ÷ 2 = 26 remainder 1, 26 ÷ 2 = 13 remainder 0, 13 ÷ 2 = 6 remainder 1, 6 ÷ 2 = 3 remainder 0, 3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1.
  2. Stop when the quotient reaches 0.
  3. Read the remainders from last to first: 11010110.

Powers of two in binary

powers2
DecimalBinaryPrevious value
110
2101
410011
81000111
16100001111
3210000011111
641000000111111
128100000001111111
25610000000011111111
5121000000000111111111
1024100000000001111111111

More decimal to binary examples

examples
DecimalBinaryDecimal
10101010
4210101042
1001100100100
25511111111255
300100101100300
100011111010001000
40951111111111114095
65535111111111111111165535

Check your answer

To check the result, convert it back: 1101 0110 in binary is 214 in decimal. Your input may only contain the decimal digits 0 1 2 3 4 5 6 7 8 9; any other character is not a valid decimal number.

Good to know

  • Every power of two is a 1 followed by zeros: 64 is 1000000.
  • Doubling a number adds a zero at the end of its binary form.
  • The number of bits needed is the length of the result; 214 needs 8.
  • The converter also shows the other bases at the same time, so a single entry gives you binary, decimal, hexadecimal and octal.

Frequently asked questions

How do I convert decimal to binary?
Type the number in the converter at the top of this page and read the binary value. For example, 214 (decimal) is 1101 0110 (binary).
How do I convert decimal to binary without dividing?
Subtract the largest power of two that fits, write a 1, and repeat with the remainder; write a 0 wherever a power does not fit.
How many bits does a number need?
The smallest n for which 2^n is greater than the number. For 214, 2^8 = 256, so 8 bits.
How many bits does 214 need?
214 is 214 in decimal, which needs 8 bits in binary.
Is this converter free and private?
Yes. It is free, needs no sign-up and works in your browser, so what you type is never sent to a server.