Decimal to Binary Converter

Turn decimal values into binary digits without a 32-bit or 64-bit integer limit.

Numbers & Units
Preparing your workspace…

Input

Preparing your workspace…

Output
Your result will appear here.

How to use

  1. Enter a decimal value, or paste one value per line.
  2. Read the binary result; adjust fraction precision if needed.
  3. Copy binary digits, or swap to convert them back.

Reading decimal values as bits

Binary uses powers of two instead of powers of ten. A decimal value such as 42 becomes 101010 because 32 + 8 + 2 equals 42.

This page starts with decimal input and binary output. It is useful for inspecting numeric flags, comparing values and checking bit patterns before choosing a fixed machine width.

Representations and workflow

The integer portion is repeatedly divided by two to determine its binary digits. Leading zeros in the source do not set a bit width; the result uses the shortest magnitude representation.

Worked example
Input
42
Result
101010

42 = 32 + 8 + 2, so the corresponding binary positions are set.

Precision and validation

A decimal fraction may not have a finite binary expansion. For example, 0.1 repeats in base two. Truncated results are marked rather than presented as exact.

Interpreting and reusing the result

Negative numbers retain a minus sign. They are not silently converted to two’s complement. Use the Bitwise Calculator when a signed 8-, 16-, 32-, 64-, 128- or 256-bit pattern is required.

Processing limits

Numbers: up to 500 lines / 1 MiB, at most 4,096 characters per numeral. Fraction output: 1–128 digits. Text and byte data: 64 KiB. Bitwise operations: 8–256 bits. Workers stop after 30 seconds; inputs are not uploaded.

?

Frequently asked questions

Does the result always have eight bits?

No. This converter returns a minimal magnitude representation. It does not add zero padding or assume a machine width.

How are negative decimal numbers converted?

The magnitude is converted to binary and the minus sign is retained. Fixed-width two’s complement is a separate operation.

Can I enter 1e6?

No. Enter 1000000 instead. Exponent notation, commas and internal spaces are rejected; 1_000_000 is accepted.

Is my input sent to a server?

No. Computation runs in a browser worker. DevToolsy does not upload or store your input.

What does Copy include?

Copy exports the selected displayed value. Download JSON preserves strings and diagnostic codes; it does not turn large numbers into floating-point values.

Find your next tool

Language

Switch language? Your current work will be cleared. Copy or download it first.