BROWSER TOOL

Decimal to binary converter Free

Convert whole decimal numbers of any size to binary, with optional 4- or 8-bit grouping and two’s complement at 8, 16, 32 or 64 bits.

Processed on your device · your files are never uploaded
Conversion

Binary11 bits11111101010

Any length works. Spaces, underscores and a 0b prefix are ignored. Everything runs on your device.

About Decimal to binary converter

Type a whole number in base 10 and get its exact binary form. Very large numbers work too, because the conversion uses arbitrary-precision integers instead of floating point.

Negative numbers can be shown with a minus sign or as a two’s complement bit pattern at a fixed width, the way computers store signed integers. Grouping by 4 or 8 bits makes long results easier to read.

How to use it

  1. Enter a decimal number, such as 2026 or -42.
  2. Choose grouping and, for negative numbers, whether to use two’s complement and at which width.
  3. Copy the binary result, or press Swap to convert it back.

Good to know

  • Numbers are converted with JavaScript BigInt, so there is no size limit beyond the 1,000,000-character input cap and your device’s memory.
  • Two’s complement is offered at 8, 16, 32 and 64 bits. Values outside the chosen width are rejected rather than silently cut off.
  • Text is always encoded as UTF-8. Other encodings such as UTF-16 or Latin-1 give different bytes for the same characters.

Questions and answers

How do I convert decimal to binary by hand?

Divide by 2 repeatedly and write down each remainder; reading the remainders from last to first gives the binary digits. For 10: 10÷2=5 r0, 5÷2=2 r1, 2÷2=1 r0, 1÷2=0 r1, so 10 is 1010.

What does two’s complement do with negative numbers?

It stores −n as 2^w − n at a width of w bits, so −1 in 8 bits is 11111111 and −128 is 10000000. The top bit acts as the sign.

Can I paste numbers with spaces, underscores or a prefix?

Yes. Spaces, tabs, line breaks and underscores are ignored, and a leading 0b (binary) or 0x (hex) prefix is accepted. If a character cannot be read, the error names it and its position.

Is my input sent anywhere?

No. Every conversion runs in your browser; nothing you type leaves your device.

Keep going