Skip to content
Mediawand

Decimal to Binary Converter

Type a decimal number and get its binary form at once, plus hex and octal. Numbers of any size convert exactly.

How to convert decimal to binary

  1. 1Type the number in the Decimal box.
  2. 2Read the binary value.
  3. 3Copy it, or turn on “Group digits” for readable groups of four.

Doing it by hand

Divide the number by 2 again and again, noting each remainder, until you reach 0. The remainders read from last to first are the binary: 42 gives remainders 0, 1, 0, 1, 0, 1, so 42 is 101010.

Any size, any base

Numbers of any length convert exactly, with no rounding, and negative numbers work too. Binary, octal, decimal and hexadecimal each get a box, and another box takes any base from 2 to 36.

Negative numbers

A negative number is shown with a minus sign, like -101010. Computers store negatives differently (two's complement), which depends on the integer size.

Frequently asked questions

Is my data uploaded?
No. The conversion runs in your browser and nothing is sent anywhere.
What is 10 in binary?
1010.
What is 255 in binary?
11111111, eight 1s, the largest value of one byte.

Related tools

Loading tools…