Number Base Converter
Convert any number between any bases 2–36: binary, octal, decimal, hex, and beyond. Shows positional expansion and repeated-division step-by-step.
What is a Number Base?
The number base (or radix) is the number of distinct digit symbols used in a positional numeral system. In positional notation, the value of each digit depends on its position: the digit at position i (counting from 0 on the right) represents that digit multiplied by the base raised to the power i.
Common bases:
- Base 2 (binary) — digits 0, 1. The language of digital electronics.
- Base 8 (octal) — digits 0–7. Used in Unix file permissions.
- Base 10 (decimal) — digits 0–9. Our everyday number system.
- Base 16 (hexadecimal) — digits 0–9 and A–F. Standard for memory addresses, color codes, and byte-level data.
Binary, octal, and hex are all powers of 2 (2¹, 2³, 2⁴), which means they interconvert without an intermediate decimal step — 4 binary digits map to one hex digit, and 3 binary digits map to one octal digit.
Formula
Converting to decimal (positional expansion): n₁₀ = d_k × b^k + d_{k−1} × b^{k−1} + … + d_1 × b + d_0
Converting from decimal (repeated division):
- Divide n by the target base b
- Record the remainder (this is the lowest-order digit)
- Replace n with the quotient and repeat until n = 0
- Read remainders from bottom to top
Direct binary ↔ hex: Group 4 binary digits from the right → each group = one hex digit
Variables:
- b — the base (radix)
- d_i — the digit at position i
- n — the integer value in decimal
How to Use
- Enter the number — type in the source number using valid digits for your chosen base (letters A–Z for digits above 9 in bases 11–36).
- Select source base — choose the base your number is currently written in (binary, octal, decimal, hex, or custom 2–36).
- Select target base — choose the base to convert to.
- Click Convert — the result appears in your target base, plus binary, octal, decimal, and hex equivalents shown simultaneously.
- Read the steps — the working panel shows the full positional expansion (from any base to decimal) and the repeated-division steps (decimal to any base).