OpenReplay Logo
12k
12k

Decimal to binary converter

Convert any decimal number to binary — handle large and signed integers, choose a fixed bit width, and view bits grouped in nibbles. Computed in your browser.

Bit width
Processed locally

About this tool

This converter turns a base-10 number into its base-2 representation. For positive numbers it repeatedly divides by two and reads the remainders; the result is the sequence of 0s and 1s a computer would store.

Enter a decimal number and the binary updates live. Leave the width unset for the shortest exact representation of a non-negative number, or pick 8, 16 or 32 bits to pad the output and to represent negative numbers in two's complement. Turn on 4-bit grouping to read long values more easily, and copy the result with one click.

Large integers are converted exactly using arbitrary-precision math, all locally.

Frequently asked questions

How are negative numbers handled?

Negative numbers require a bit width, because two's complement is defined relative to a fixed number of bits. Choose a width and −1 becomes 11111111 in 8 bits, −128 becomes 10000000, and so on.

Is there a maximum number?

No — conversion uses arbitrary-precision integers, so even numbers far beyond 64 bits convert exactly without rounding.

What does 4-bit grouping do?

It inserts a space every four bits (one nibble), so 11110000 reads as 1111 0000. It's purely visual and makes long binary values easier to scan; it doesn't change the value.