Number Base Converter

Enter a number and choose its base. You get the value in binary, octal, decimal, hex, and a custom base in one go. Handy for low-level code and number theory.

From base
Try
Binary (2)
-
Octal (8)
-
Decimal (10)
-
Hex (16)
-
Custom
-
Show step-by-step conversion

Enter a number to see the conversion steps.

Fraction to another base
Enter a decimal fraction to convert.
Comparison table (decimal vs binary, octal, hex)

How bases relate

Number systems use a fixed set of digits. The base (radix) is how many digits you have. Binary uses 0 and 1; decimal uses 0–9; hex uses 0–9 and A–F for 10–15.

Common systems

Binary (base 2)

Digits 0, 1. Used in computers and digital logic. Example: 1011₂ = 11₁₀.

Octal (base 8)

Digits 0–7. Often used for Unix permissions. Example: 377₈ = 255₁₀.

Decimal (base 10)

Digits 0–9. Everyday numbers. Example: 255₁₀.

Hexadecimal (base 16)

Digits 0–9, A–F. Common in programming and colors. Example: FF₁₆ = 255₁₀.

To decimal from any base

Multiply each digit by the base raised to its position, then add. Example: 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11₁₀.

From decimal to another base

Divide by the target base repeatedly. The remainders (read in reverse) give the digits. For non-decimal to non-decimal, convert via decimal first.

The catch with fractions

Some decimal fractions do not have a finite representation in other bases. The tool stops at the precision you set; the result may be repeating or approximate.