Base-N Number Converter (Bases 2–36)
Introduction
This base-N number converter changes the way an integer is written without changing its value. If you type a number in binary, octal, decimal, hexadecimal, or any other base from 2 through 36, the calculator rewrites that same quantity in the target base using digits 0 through 9 and letters A through Z. That makes the tool useful for programming tasks, debugging, studying number systems, and checking hand calculations when you want to confirm that a result is correct.
People often first meet base conversion through binary and decimal, but the same idea applies far more broadly. The decimal value 255 can be written as 11111111 in base 2, 377 in base 8, FF in base 16, and 73 in base 36. Those strings look different because their place values are different, yet they all represent exactly the same integer. This page explains that relationship before the form so you can understand not only what the calculator returns, but also why the answer has that shape.
The converter runs entirely in your browser. After the page has loaded, no network request is needed to perform the calculation itself. That keeps the tool fast, lets you experiment freely with many examples in a row, and helps when you want an offline reference for common conversions between binary, octal, decimal, hexadecimal, and higher radices.
How to Use
Start with the Number field and enter the integer exactly as it appears in the source base. You may use digits 0 through 9 and letters A through Z. Letters are case-insensitive, so ff and FF mean the same thing on input. If the number is negative, place a minus sign at the front, such as -1011 or -2A3. The form is meant for whole numbers, so you should not enter decimal points or fractional parts.
Next, set From Base to the radix of the number you entered. This tells the calculator how to interpret each digit. Then set To Base to the radix you want for the final representation. When you press Convert, the result area shows the rewritten value and also displays the equivalent decimal integer. That decimal line is useful because it lets you verify that several different representations all point to the same underlying quantity.
A quick mental check can save time and prevent mistakes. In base 2, only 0 and 1 are valid. In base 8, the largest legal digit is 7. In base 16, the letters stop at F because A through F stand for 10 through 15. In base 36, the letters extend to Z. If your source number contains a symbol that does not belong to the selected base, the converter reports an error instead of guessing what you meant.
Two good test cases are 1011 from base 2 to base 10 and 2A3 from base 16 to base 2. They are small enough to verify by hand, but they also show how the same number can look compact in one base and longer in another.
Formula
All positional number systems use the same core rule: each digit has a face value and a place value. The place value is a power of the base. Reading from right to left, the first position has weight base0, the next has weight base1, then base2, and so on. That is why the same sequence of symbols can mean one quantity in one base and a different quantity in another.
Suppose a number in base b has digits dk through d0. Its value N can be written as the sum of each digit multiplied by the correct power of the base:
Here, each digit di must be an integer from 0 up to, but not including, the base b. So in base 8 the digit 8 is illegal, and in base 16 the digit G is illegal. The converter first interprets your input using this positional formula in the source base, then rewrites the same integer in the target base.
The reverse step is often described with repeated division. If N is a nonnegative integer and b is the target base, repeated division by b produces remainders that become the digits of the answer. Reading those remainders from last to first gives the final representation.
That second relation explains why conversion output is never arbitrary. Every digit in the result corresponds to a remainder and therefore to a place value. Whether you do the work by hand or let JavaScript perform it instantly, the mathematical idea is the same.
Supported Bases and Digit Symbols
This converter accepts any whole-number base from 2 through 36. The symbol set is simple: values 0 through 9 use 0 through 9, and values 10 through 35 use A through Z. Lowercase letters are accepted in the input, but the output is normalized to uppercase so the answer is consistent and easier to read in code, notes, and technical documentation.
Several bases appear repeatedly in computing. Base 2 is binary, the language of bits. Base 8 is octal, which compresses binary into groups of three bits. Base 10 is decimal, the everyday human system. Base 16 is hexadecimal, a compact representation because each hex digit corresponds to four bits. Base 36 is handy when you want a short text form that uses both digits and letters.
How the Conversion Algorithm Works in Practice
Internally, the calculation follows two stages. First, the input string is parsed in the source base to recover the integer value it represents. Second, that same integer is formatted again in the target base. On this page, browser-side JavaScript handles both steps immediately after form submission, which means the converter remains responsive and private for typical use.
The most important assumption is that the input is an integer and every character belongs to the chosen source base. A leading minus sign is allowed for negative values. Once the integer value has been identified, the target representation is just another way to write it using a different set of place-value weights. That is why 11 in base 10 becomes 1011 in base 2, while 1011 in base 2 becomes 11 in base 10. The quantity stays fixed; only the notation changes.
Example
A worked example makes the idea concrete. Suppose you want to convert the hexadecimal number 2A3 to decimal and then to binary. In hexadecimal, the symbol A stands for 10. So the number is read as one digit times 16 squared, plus one digit times 16 to the first power, plus one digit times 16 to the zero power.
Expanding the value gives 2 × 16² + 10 × 16¹ + 3 × 16⁰. That becomes 512 + 160 + 3, which equals 675. Therefore 2A3 in base 16 is exactly the same quantity as 675 in base 10.
To continue into binary, divide 675 by 2 repeatedly and record the remainders. Reading the remainders from last to first yields 1010100011. So the full chain is 2A316 = 67510 = 10101000112. If you enter 2A3 with From Base 16 and To Base 2 in the form below, the calculator should return that same binary value.
A smaller example is 1011 in base 2. Using positional weights, it equals 1 × 2³ + 0 × 2² + 1 × 2¹ + 1 × 2⁰, which simplifies to 8 + 0 + 2 + 1 = 11. That is why the calculator returns 11 in decimal when you convert binary 1011. The tool is not inventing a new number; it is simply expressing the same integer in a different system.
Comparison Table
Looking at the same value in several bases is a good way to build intuition. The table below shows how the decimal integer 255 appears in several common systems. Notice how smaller bases tend to need more symbols, while larger bases can express the same value more compactly.
| Base | System | Representation of 255 |
|---|---|---|
| 2 | Binary | 11111111 |
| 8 | Octal | 377 |
| 10 | Decimal | 255 |
| 16 | Hexadecimal | FF |
| 36 | Base-36 | 73 |
That pattern explains why programmers often prefer hexadecimal when inspecting bytes, colors, or memory values. Hex is much shorter than binary, but it still maps cleanly to the same underlying bits.
Limitations
This calculator is intentionally focused. It is excellent for quick whole-number base changes, but it is not a full symbolic math system. The input must represent an integer, the bases must stay between 2 and 36, and every digit must be valid for the selected source base. Those constraints keep the interface straightforward and keep the results easy to interpret.
- Integers only: fractional parts such as
3.14or101.101are not supported. - Base range 2–36: unary, base 1, and bases above 36 are outside the supported symbol set.
- Valid characters required: only digits
0–9and lettersA–Zare accepted. - Digit limits depend on the base: for example,
8is not allowed in base 8 andGis not allowed in base 16. - Negative numbers are allowed: use a leading minus sign, such as
-FFor-1011. - Very large values can be difficult: the page uses standard browser number handling, which is fine for ordinary study and programming examples but may lose exactness for extremely large integers.
- No arithmetic is performed: the tool converts notation only; it does not add, subtract, multiply, or divide separate inputs.
One practical note is worth stressing. If you are working with enormous values, such as very long identifiers or cryptographic-scale integers, you may want an arbitrary-precision or BigInt-based tool instead. For classroom problems, debugging, quick sanity checks, and ordinary technical work, though, this calculator is fast, clear, and dependable.
Once those assumptions are clear, the workflow is simple: enter the digits, choose the source base, choose the target base, and read the same integer in a new notation.
Optional Mini-Game: Radix Relay
If you want to make base conversion feel quicker and more intuitive, try the mini-game below. Each round shows a decimal target and a destination base. Your job is to tap the drifting digit bubbles in the exact left-to-right order needed to write that number in the target base. Correct picks build the answer, extend your streak, and add a little time. Wrong picks cost time, and tapping a symbol that does not belong to the current base is a memorable way to learn the digit limits that the calculator enforces.
Best score is saved on this device so you can chase cleaner, faster conversions over multiple runs.
