Any Base Converter
Convert a number between any two bases from 2 to 36 — binary, octal, decimal, hex and beyond — with the common bases shown too.
How it works
value = Σ digitᵢ × from^i (right to left), then repeatedly divide by the target base for the new digits
Converting between bases is a two-part trip through decimal: first evaluate the source number by multiplying each digit by its base raised to the position power, giving a plain integer; then repeatedly divide that integer by the target base, and the remainders — read bottom to top — are the new digits. Bases above 10 borrow letters (a = 10 … z = 35), which is why hexadecimal runs 0–9 then A–F. The value itself never changes; only its written representation does.
Worked example
Hex FF to binary: F = 15, so FF = 15 × 16 + 15 = 255 in decimal. Dividing 255 by 2 repeatedly gives remainders 1,1,1,1,1,1,1,1 — so FF₁₆ = 11111111₂ = 377₈ = 255₁₀.
Frequently asked questions
What is the highest base this supports?
Base 36, which uses digits 0–9 followed by the letters a–z for values 10 through 35. Beyond 36 there are no standard single-character digits, so conventions diverge.
Why do programmers use hexadecimal?
Each hex digit maps to exactly four binary bits, so a byte is always two hex digits (00–FF). It is far more compact and less error-prone than long binary strings while staying trivially convertible to bits.
Can it handle very large numbers?
It converts integers up to JavaScript’s safe limit (about 9 quadrillion). Beyond that, floating-point rounding would corrupt the digits, so the calculator flags the number as too large rather than return a wrong answer.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.