Binary to Decimal Converter

Read binary integers and fractions as exact decimal values where possible.

Numbers & Units
Preparing your workspace…

Input

Preparing your workspace…

Output
Your result will appear here.

How to use

  1. Enter binary digits, optionally beginning with 0b.
  2. Check the decimal result and any invalid-digit message.
  3. Copy the value or swap the conversion direction.

From bit positions to a decimal value

Each binary position contributes a power of two. In 101010, the set positions contribute 32, 8 and 2, giving decimal 42.

Use this tool to interpret a numeric bit string. To decode bytes that represent text, use Binary to Text instead; numeric conversion and text decoding answer different questions.

Representations and workflow

Only digits 0 and 1 belong to base two. A sign, a fraction point and underscores between digits are supported. Spaces do not join separate bytes into one number.

Worked example
Input
101010
Result
42

The six binary digits describe the number 42, not a sequence of text characters.

Precision and validation

The binary fraction 0.101 is 1/2 + 1/8, or decimal 0.625. The same exact arithmetic used for integer values also handles the fractional portion.

Interpreting and reusing the result

A leading 1 does not imply a negative number here. For example, 11111111 is 255. Its signed 8-bit interpretation is −1 only when an explicit two’s-complement width is applied.

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

Is 11111111 equal to 255 or −1?

This converter returns 255. A signed interpretation requires an explicit bit width; use the Bitwise Calculator for that.

Can I paste groups such as 1010 1010?

Use 1010_1010 for one numeric value. A space separates neither positions nor bytes in this converter.

Can this read a binary text message?

Use Binary to Text for eight-bit UTF-8 byte sequences. This page treats the entire input line as one mathematical number.

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.