Decimal to Binary Converter

Convert any decimal number to binary instantly. See the step-by-step division by 2, the bit count, and the hexadecimal and octal equivalents. Free, private, and runs entirely in your browser.

Enter a Decimal Number

Enter a decimal number and click Convert to Binary to see the result with a step-by-step breakdown.

Binary
—
Bit Count
—
Hexadecimal
—
Octal
—
Byte Size
—

Step-by-step breakdown

Summary

What does this Decimal to Binary Converter do?

This free online decimal to binary converter turns any base-10 number into its base-2 equivalent. Decimal is the number system we use every day, with ten digits (0 through 9). Binary is the number system computers use internally, with only two digits (0 and 1). Every value you type into a computer — text, images, video, programs — is ultimately represented as a sequence of binary digits.

Beyond just showing you the binary result, this converter walks through the standard repeated-division method step by step. You'll see each division by 2, the remainder at each step, and how the final binary number is assembled from the remainders read in reverse order. It also provides the hexadecimal and octal equivalents, since these number systems are closely related to binary and are used heavily in programming and digital electronics.

Everything runs locally in your browser. The number you enter never leaves your device — no server, no logs, no tracking. You can convert as many numbers as you want, with no limits and no signup.

How to convert decimal to binary

  1. Enter a decimal number: Type any non-negative integer (0, 1, 2, 3, …) up to 4,294,967,295 into the input field. You can also click one of the quick-pick buttons for common values.
  2. Click Convert: The converter instantly computes the binary equivalent and displays it.
  3. Review the breakdown: Below the result, you'll see each division by 2 with its quotient and remainder, showing exactly how the binary number was built.
  4. Check the alternatives: The hexadecimal and octal equivalents are shown alongside the bit count and byte size.
  5. Copy if needed: Use the "Copy Results" button to grab a formatted summary.

That's it. No signup, no email, no waiting. The entire process takes seconds.

Decimal to binary conversion method

The standard method for converting a decimal integer to binary is repeated division by 2. Here's the complete algorithm.

Repeated division by 2
Step 1: Divide the decimal number by 2.
Step 2: Record the remainder (0 or 1).
Step 3: Divide the quotient by 2 again.
Step 4: Repeat until the quotient is 0.
Step 5: Read the remainders from bottom to top.
Example: convert 13 to binary
13 ÷ 2 = 6 remainder 1 ← least significant bit
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1 ← most significant bit

Read bottom to top: 1101
Verification (binary to decimal)
1101 = 1×2³ + 1×2² + 0×2¹ + 1×2⁰
= 8 + 4 + 0 + 1
= 13

An alternative method is to find the largest power of 2 that fits, subtract it, and mark that bit as 1, then repeat with the remainder. The repeated-division method is more systematic and easier to automate, which is why it's the standard approach taught in computer science courses.

Decimal to binary reference table

Here's a quick reference for the first 32 decimal values, along with their 4-bit and 8-bit binary representations.

Decimal Binary (4-bit) Binary (8-bit) Hexadecimal
00000000000000
10001000000011
20010000000102
30011000000113
40100000001004
50101000001015
60110000001106
70111000001117
81000000010008
91001000010019
10101000001010A
11101100001011B
12110000001100C
13110100001101D
14111000001110E
15111100001111F
16100000001000010
321000000010000020
6410000000100000040
128100000001000000080
2551111111111111111FF
256100000000— (9 bits)100
10001111101000— (10 bits)3E8

Notice the pattern: the values 1, 2, 4, 8, 16, 32, 64, 128 are powers of 2, and each one is a single 1 followed by zeros in binary. That's why binary is the natural language of computers — every position represents a power of 2.

Where decimal-to-binary conversion is used

Binary conversion isn't just a classroom exercise — it's a fundamental skill in several fields.

Computer programming

Programmers work with binary all the time, especially when dealing with bitwise operations, flags, masks, and low-level memory manipulation. Understanding how decimal numbers map to binary makes it much easier to read hex dumps, debug bitwise logic, and write efficient code for embedded systems.

Digital electronics

Digital circuits work entirely in binary. When you design a counter, a shift register, or a memory address decoder, you need to know how decimal values map to binary patterns. Seven-segment displays, for example, use 7-bit binary patterns to show the digits 0–9.

Networking and IP addresses

IPv4 addresses are 32-bit binary numbers, usually written as four decimal octets (like 192.168.1.1). Converting between decimal and binary is essential for subnetting, calculating network ranges, and understanding CIDR notation.

Data encoding and compression

Character encodings (ASCII, UTF-8), image formats, audio codecs, and compression algorithms all operate on binary data. When you look at a hex editor to inspect a file, you're seeing the binary content displayed in a more compact form.

Cryptography

Modern encryption algorithms operate on binary data. Block ciphers like AES process data in 128-bit blocks, and hash functions like SHA-256 produce 256-bit binary digests. Understanding binary representation helps when working with cryptographic primitives and protocols.

Education and interviews

Decimal-to-binary conversion is a standard topic in computer science curricula and a common interview question for software engineering roles. Being able to do it fluently — both by hand and programmatically — is a baseline skill for anyone working with computers.

Why use this converter?

Instant results

No server round-trip means your answer appears the moment you click Convert. Zero waiting.

Step-by-step breakdown

See each division by 2, the quotient and remainder at each step, and how the binary number is assembled.

100% private

Everything runs in your browser. The number you enter never leaves your device — no server, no logs, no tracking.

Hex and octal too

Every conversion also shows the hexadecimal and octal equivalents, so you get all the common bases in one shot.

No limits

Convert as many numbers as you want. No daily caps, no watermarks, no "upgrade to pro" nonsense.

Works offline

Once the page loads, you can use the converter without an internet connection. Bookmark it for exam prep.

Common mistakes to avoid

  • Reading the remainders in the wrong order. The remainders are collected from the first division (least significant bit) to the last (most significant bit). You must reverse them to get the correct binary number.
  • Stopping too early. Keep dividing until the quotient is 0, not until you get a remainder of 0. The quotient hitting 0 is the stopping condition.
  • Forgetting that 0 in decimal is 0 in binary. Zero is a valid input and the result is simply "0" — not an empty string.
  • Mixing up binary and BCD. Binary is a positional number system, while BCD (Binary-Coded Decimal) encodes each decimal digit separately in 4 bits. For example, 12 in binary is 1100, but in BCD it's 0001 0010.
  • Assuming all binary numbers are 8 bits. Binary numbers have no fixed width unless you specify one. 13 is 1101 (4 bits), not 00001101 (8 bits) — although both represent the same value. This calculator shows the minimal representation.

Frequently asked questions

Decimal to binary conversion is the process of converting a base-10 number into its base-2 equivalent. For example, the decimal number 13 becomes 1101 in binary.
The standard method is repeated division by 2. Divide the decimal number by 2, record the remainder (0 or 1), then divide the quotient by 2 again. Repeat until the quotient is 0. Read the remainders from bottom to top to get the binary number.
This calculator supports decimal numbers up to 4,294,967,295 (2³² − 1), which is the maximum value that fits in 32 bits. For larger numbers, use a dedicated big-integer converter.
The number of bits is the number of digits in the binary result. For example, 13 in binary is 1101, which has 4 bits. The calculator shows the bit count for every conversion.
This calculator handles non-negative decimal numbers only. Negative numbers require two's complement representation, which uses a sign bit and is a separate topic.
Binary is base-2 (digits 0-1), octal is base-8 (digits 0-7), and hexadecimal is base-16 (digits 0-9 and A-F). Binary is what computers use internally, but octal and hex are more compact ways to write the same values.
Yes, completely free. No signup, no watermark, no hidden charges. Use it as many times as you want, for homework, work, or personal projects.
Absolutely. Everything runs in your browser using JavaScript. The number you enter never leaves your device — there is no server processing, no logging, and no data storage. Close the tab and it's gone.