AIForeverThing

Number Base Converter

Convert numbers between binary, octal, decimal, hexadecimal, and any custom base (2–36)

Input

Conversion Results

Binary (Base 2)
Octal (Base 8)
Decimal (Base 10)
Hexadecimal (Base 16)

How It Works

To convert a number from any base to another, the tool first parses the input into decimal (base 10). Each digit is multiplied by the input base raised to the power of its position: value = dₙ×bⁿ + dₙ₋₁×bⁿ⁻¹ + … + d₀×b⁰. The resulting decimal value is then converted to the target base by repeatedly dividing by that base and collecting remainders in reverse order. This two-step process — input base to decimal, then decimal to output base — works for any base from 2 to 36.

Frequently Asked Questions

How do I convert binary to decimal?

Each binary digit represents a power of 2, starting from the rightmost digit (2⁰). For example, binary 1010 = (1×2³) + (0×2²) + (1×2¹) + (0×2⁰) = 8 + 0 + 2 + 0 = 10 in decimal.

What is the difference between hexadecimal and binary?

Binary uses base 2 with digits 0 and 1, while hexadecimal uses base 16 with digits 0–9 and letters A–F. Each hex digit maps to exactly 4 binary digits, making hex a compact way to represent binary data in programming.

Can I convert between any number base?

Yes. This converter supports any base from 2 to 36. Bases above 10 use letters A–Z to represent digit values 10–35. Just select "Custom Base" and enter your desired base.

Free tools by TUNA — energy supply from vetted manufacturers