Decimal to binary converter

Type a whole decimal number and get its binary form straight away. Turn on grouping to split the bits into blocks of four, which is easier to read.

  • Free
  • No sign-up
  • Runs in your browser

Binary (2)

1010

The same number in common bases
BaseValue
Binary (2)1010
Octal (8)12
Decimal (10)10
Hexadecimal (16)A

Whole numbers of any size are converted exactly (up to 5,000 digits). Prefixes 0x, 0b and 0o, spaces, underscores and a leading minus sign are accepted. Fractions are not supported.

Runs in your browser — your text is never sent to our servers.

How to use Decimal to Binary

  1. Type your decimal number, for example 255. A leading minus sign is allowed.
  2. Read the binary value in the result box.
  3. Tick "Group digits" to see the bits in blocks of four.
  4. Click Copy to copy the binary value.

Features

  • Exact for large whole numbers, well beyond 64 bits
  • Optional grouping of bits in blocks of four
  • Also shows the value in octal and hexadecimal
  • Clear message if the input is not a valid decimal number
  • Runs in your browser, so nothing is uploaded

Supported formats and limits

  • Maximum input: 10,000,000 characters

Examples

InputResult
101010
25511111111
102410000000000
-5-101 — The minus sign is kept; this is not two’s complement.

Limitations

  • Only whole numbers are supported; decimals such as 3.14 are not converted.
  • Negative numbers get a minus sign in front of the binary digits, not two’s complement.
  • Input is limited to 5,000 digits.

Learn more

Decimal is the base-10 system we use every day, while binary uses only 0 and 1. To convert a decimal number to binary you express it as a sum of powers of two. For 13, that is 8 + 4 + 1, which sets the bits for 8, 4 and 1 and leaves the bit for 2 empty: 1101.

The usual hand method is repeated division by 2. Each division leaves a remainder of 0 or 1; the remainders, read from the last one back to the first, form the binary number. The tool does the same thing with exact integer arithmetic, so large values do not lose digits.

The number of bits needed grows slowly: 8 bits cover 0 to 255, 16 bits cover 0 to 65,535 and 32 bits cover values above four billion. That is why sizes such as 8-bit, 16-bit and 32-bit appear throughout computing.

Frequently asked questions

How do I convert decimal to binary by hand?

Divide the number by 2 repeatedly and write down each remainder. Reading the remainders from last to first gives the binary number. For 10: remainders 0, 1, 0, 1, so 1010.

Why group the bits in fours?

Each group of four bits matches exactly one hexadecimal digit, so grouped binary is easier to read and to compare with hex.

Can it convert negative numbers?

It keeps the minus sign: -5 becomes -101. Two’s complement, used inside computers, is not applied.

Is my input uploaded?

No. The conversion runs in your browser.

Sources

Last reviewed: September 30, 2026