Decimal to Binary Converter

Convert decimal to binary (base 10 → base 2)

Use this converter when you have decimal integers (base 10) and need the binary representation (base 2).

This page is a focused Decimal → Binary variant. It’s optimized for quick pastes and lists: batch mode is enabled by default (one value per line).

Need more options (other bases, formatting, etc.)? Open the full Number Base Converter.


How to use it

  1. Paste your decimal values into the input (left).
  2. Use one number per line (batch mode).
  3. Copy the binary results from the output (right).

Signed values are supported: -42 converts to -101010.


Input rules (decimal)

Integers only

Valid examples:

  • 0
  • 15
  • +15
  • -15
  • 000123 (leading zeros are fine)

Not supported here:

  • 3.14
  • 1e6
  • 12,345 (remove commas first)

Whitespace is fine

Extra spaces and empty lines are okay in batch mode. Each line is processed independently.


Output format (binary)

  • Output is plain binary digits: 0 and 1
  • Negative values keep a leading minus sign
  • No 0b prefix by default

Examples:

  • 42101010
  • 25511111111
  • 102410000000000
  • -9-1001

Batch example (one per line)

Input (decimal):

10
255
-42
7
3.14

Output (binary):

1010
11111111
-101010
111
!ERROR: Decimal input may contain only digits 0–9

One invalid line won’t break the rest.

Common use cases

  • Converting IDs or values between human-readable decimal and bit-level binary
  • Working with bitmasks and flags
  • Learning computer science fundamentals (bases, place values, binary math)
  • Debugging code that prints values in decimal but needs binary inspection.

Troubleshooting

“Invalid digit for decimal”

Decimal input can contain only:

digits 0–9

an optional leading + or -

Remove commas, periods, or scientific notation.

Notes

  • This is number base conversion, not text/byte encoding.
  • Everything runs locally in your browser — nothing is uploaded.

Frequently Asked Questions

Yes. Use a leading minus sign (−) or plus sign (+) and the sign is preserved in the output.

Yes. This variant runs in batch mode by default: paste one decimal integer per line and get one binary result per line.

No. It outputs a signed binary string with a leading '-' for negative values. If you need fixed-width two’s complement (8/16/32-bit), use the full tool and format accordingly.

This converter is for integers only. Values like 3.14 or 1e6 aren’t supported as decimal input.

No. All conversions run locally in your browser.

Try one of our format-specific converters below

Explore Our Tools

Read More From Our Blog