Input

Output

What Is Decimal to Binary Conversion?

Every developer hits that moment where they need to know what 255 looks like in binary (it's 11111111, by the way). Whether you're studying bitwise operations, debugging network masks, or just curious about how computers actually store data, converting between decimal and binary is a fundamental skill. This tool handles it instantly in your browser. The MDN Number.toString(2) docs cover the JavaScript native approach, and the IEEE 754 standard defines how computers represent numbers internally.

Binary numbers are fundamental to computer science and digital electronics. All data in computers is ultimately stored and processed as binary values. Learn the fundamentals with this Khan Academy binary lesson. This tool converts decimal integers to their binary equivalents instantly, supporting multiple values at once.

How to Use This Tool

1

Enter Decimal Numbers

Type or paste one decimal number per line in the left editor. You can also click Sample to load example values, or Upload a text file.

2

View Binary Output

The right panel updates automatically with the binary representation of each decimal number. Negative numbers are prefixed with a minus sign.

3

Copy or Download

Click Copy to copy the binary output to your clipboard, or Download to save it as a text file.

Conversion Examples

Here are some common decimal to binary conversions:

Decimal Input

Input

Binary Output

Output

Frequently Asked Questions

How do I convert decimal to binary step by step?

Divide the decimal number by 2 repeatedly, writing down each remainder. Then read the remainders bottom-up. For example, 42: 42÷2=21r0, 21÷2=10r1, 10÷2=5r0, 5÷2=2r1, 2÷2=1r0, 1÷2=0r1 — reversed: 101010. The Number.toString(2) method does this in one call.

Can this tool handle very large numbers?

Yes. The tool uses JavaScript BigInt internally, so there's no size limit. Paste any integer and get its exact binary representation.

Is my data sent to a server?

No. Everything runs locally in your browser. You can verify by checking the Network tab in your browser DevTools. Nothing leaves your machine.

Does it support negative numbers?

Yes. Negative decimals produce a binary result prefixed with a minus sign (e.g., -42-101010). For two's complement representation, check the Electronics Tutorials on binary math.

What is binary used for in real-world programming?

Binary is how computers store everything — from numbers to text to images. You'll use binary when working with bitwise operators, subnet masks, file permissions (like Unix chmod), and low-level data protocols. The Khan Academy binary lesson is a great starting point.

Related Tools

Learn more: IEEE 754 floating-point standard, Electronics Tutorials on binary conversion, and the MDN parseInt documentation.