Binary Converter

Convert binary (base 2) numbers to decimal and decimal numbers to binary instantly. Works with numbers of any size and groups binary digits in blocks of four.

  • 100% free
  • No signup
  • Runs in your browser

Overview

Convert between binary (base 2) and decimal (base 10) numbers.

How to use

  1. To convert binary to decimal, type the binary number (only 0 and 1) in the Binary field. A 0b prefix and spaces are allowed.
  2. To convert decimal to binary, type a whole number in the Decimal field.
  3. The other field updates as you type. Binary results are grouped in blocks of four digits for readability.

How binary works

Binary is a base-2 number system that uses only the digits 0 and 1. Each position is worth twice the position to its right: 1, 2, 4, 8, 16, 32 and so on. Computers use binary because a bit is either off (0) or on (1).

To convert binary to decimal, add the place values of the 1s: 1011 = 8 + 0 + 2 + 1 = 11.

To convert decimal to binary, divide by 2 again and again and read the remainders from last to first: 13 → 6 remainder 1 → 3 remainder 0 → 1 remainder 1 → 0 remainder 1, so 13 = 1101.

Common binary values

Value Binary = decimal
The number 10 1010 = 10
The number 100 1100100 = 100
Largest one-byte value (8 bits) 11111111 = 255
Largest 16-bit value 1111111111111111 = 65535

Examples

Example Result
Binary 1011 to decimal 8 + 2 + 1 = 11
Decimal 13 to binary 1101
Binary 11111111 to decimal 255, the largest value of one byte
Decimal 1000 to binary 11 1110 1000
Tips: Enter only 0 and 1 for binary; leading zeros are optional.

FAQ

Binary uses only the digits 0 and 1 (base 2); each bit is a power of 2.

Write the powers of 2 above the digits from right to left (1, 2, 4, 8, …) and add the ones that stand above a 1. 1101 = 8 + 4 + 1 = 13.

n bits can store values from 0 to 2ⁿ − 1: 8 bits up to 255, 16 bits up to 65,535 and 32 bits up to 4,294,967,295.

Each group of four bits matches exactly one hexadecimal digit, which makes long binary numbers easier to read and to convert: 1111 1111 = FF.

This converter handles non-negative whole numbers of any size. For negative numbers in two’s complement, use the hexadecimal converter, which shows 8-, 16-, 32- and 64-bit values.

Need another tool?

Explore all 61 free tools: calculators, converters, date and time tools, random generators and text utilities.

Browse all tools