Number Base Converter

Convert a number between binary, octal, decimal, hexadecimal and any other base from 2 to 36. Large numbers are supported.

How to use the Number Base Converter

  1. Type a number into any of the boxes: binary, octal, decimal or hexadecimal.
  2. The other boxes update instantly with the same value in their base.
  3. Use the custom base box to convert to or from any base between 2 and 36.

Number bases explained

A number base (or radix) is how many different digits a system uses. Decimal uses ten (0–9). Binary uses two (0 and 1) and is how computers store everything. Hexadecimal uses sixteen (0–9 then A–F) and is a compact way to write binary, because each hex digit stands for exactly four bits. Octal uses eight digits, each standing for three bits.

Decimal Binary Octal Hex
1 1 1 1
8 1000 10 8
10 1010 12 A
16 10000 20 10
255 11111111 377 FF
1024 10000000000 2000 400

Converting by hand

To convert decimal to another base, divide repeatedly by the base and read the remainders from last to first. To convert to decimal, multiply each digit by the base raised to its position and add the results: 1011₂ = 8 + 0 + 2 + 1 = 11.

Frequently asked questions

How do I convert binary to decimal?

Multiply each bit by 2 raised to its position (starting from 0 on the right) and add them. For example, 1101 = 8 + 4 + 0 + 1 = 13.

How do I convert decimal to hexadecimal?

Divide the number by 16 repeatedly and write the remainders in reverse, using A–F for 10–15. For example, 255 = FF.

Why do programmers use hexadecimal?

One hex digit represents exactly four bits, so a byte is always two hex digits. That makes binary data much shorter and easier to read.

What is the largest base supported?

Base 36, which uses the digits 0–9 and the letters A–Z.