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
- Paste your decimal values into the input (left).
- Use one number per line (batch mode).
- Copy the binary results from the output (right).
Signed values are supported: -42 converts to -101010.
Input rules (decimal)
Integers only
Valid examples:
015+15-15000123(leading zeros are fine)
Not supported here:
3.141e612,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:
0and1 - Negative values keep a leading minus sign
- No
0bprefix by default
Examples:
42→101010255→111111111024→10000000000-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.