Decimal to Binary Converter

Convert a decimal (base 10) number to binary (base 2) instantly. As an example, 255 = 11111111. It runs entirely in your browser.

BaseThis number
Binary (base 2)
Octal (base 8)
Decimal (base 10)
Hexadecimal (base 16)

How to convert decimal to binary

To convert a decimal number to binary, divide it by 2 repeatedly and read the remainders from last to first. For example, 255 in binary is:

255 (decimal) = 11111111 (binary)

Worked example: 255 in binary

Reading 255 as base 10: 2 × 102 (= 200) + 5 × 101 (= 50) + 5 × 100 (= 5) = 255 in decimal, which is 11111111 in binary.

Binary, octal, decimal & hexadecimal reference table

DecimalBinaryOctalHex
1111
21022
410044
81000108
10101012A
15111117F
16100002010
321000004020
64100000010040
100110010014464
1281000000020080
25511111111377FF
256100000000400100
1024100000000002000400

About decimal and binary

Decimal: Decimal is base-10, the everyday number system using digits 0–9.

Binary: Binary is base-2: every digit (bit) is 0 or 1. It is how computers store and process all data at the hardware level.

Frequently asked questions

What is 255 decimal in binary?
255 in decimal (base 10) equals 11111111 in binary (base 2), which is 255 in decimal.
How do I convert decimal to binary by hand?
Repeatedly divide the decimal number by 2 and read the remainders from last to first. 255 in base 2 is 11111111.
Is this exact for very large numbers?
Yes. The converter uses big-integer (BigInt) arithmetic in your browser, so even very long decimal values convert to binary with no rounding or precision loss.
Which characters are valid in decimal?
Base-10 decimal uses the digits 0–9. Spaces, underscores and an optional 0x/0b/0o prefix are ignored; any other character is flagged as invalid.

Related number conversions

See all number-base conversions →