This calculator converts integers between any two bases from 2 to 36. You can move freely between binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16), and any other base in that range. The tool uses digits 0–9 and letters A–Z (case-insensitive) and works entirely in your browser, so the numbers you enter are not sent to a server.
The converter only changes how a number is written; it does not change its underlying value. For example, the decimal number 255 is the same quantity as the hexadecimal number FF and the binary number 11111111. They are three different representations of one integer.
On this page you will find:
Most number systems used in mathematics and computing are positional. In a positional system, the value of each digit depends on both the symbol itself and the position it occupies. Each position has a weight that is a power of the base (also called the radix).
In base 10 (the decimal system), the number 457 means:
4 × 102 + 5 × 101 + 7 × 100 = 400 + 50 + 7.
In base 2 (binary), each position is a power of 2. The binary number 1011 represents:
1 × 23 + 0 × 22 + 1 × 21 + 1 × 20 = 8 + 0 + 2 + 1 = 11 in decimal.
More generally, if you have a number written in base b with digits from the most significant digit dk down to the least significant digit d0, its value N in decimal can be written as a polynomial in the base:
Here, each digit di is an integer from 0 up to (but not including) the base b. The base-N converter evaluates this positional polynomial for the source base and then expresses the same value using digits in the target base.
This tool supports any integer base from 2 through 36. The available digit symbols are:
Letters are treated in a case-insensitive way, so a and A are equivalent.
Some common bases include:
Converting between bases is usually done in two steps:
Conceptually, step 1 evaluates the positional polynomial in the source base. Step 2 finds the digits for the same integer value in the target base.
In many programming languages, including JavaScript, these steps are implemented by built-in functions that already understand bases 2 to 36. The internal workflow typically looks like this:
This approach is compact, reliable for a wide range of integers, and runs entirely in your browser. No network request is required once the page has loaded.
After you enter a number, select its base, and choose a target base, the calculator displays a single output number. Keep these points in mind when reading the result:
- sign, the output will also include a leading
minus sign.
0, the output will also be 0 in any base.
For example:
1011 with source base 2 and target base 10 yields 11.
11 with source base 10 and target base 2 yields 1011.
-FF with source base 16 and target base 10 yields -255.
Suppose you want to convert the hexadecimal number 2A3 (base 16) into binary (base 2)
and decimal (base 10).
In hexadecimal, the digits have the following values:
2 → 2A → 103 → 3From left to right, 2A3 means:
2 × 162 + 10 × 161 + 3 × 160
Compute each part:
Add them together:
512 + 160 + 3 = 675.
So 2A316 = 67510.
Now convert the decimal integer 675 to base 2. One common method is to divide by 2 repeatedly and track remainders:
Reading the remainders from last to first, you get:
1010100011.
So 67510 = 10101000112, and therefore 2A316 = 10101000112.
The table below shows the same integer written in several common bases. This can help you spot patterns and verify that the converter is giving you consistent answers.
| Base | System | Representation of 255 |
|---|---|---|
| 2 | Binary | 11111111 |
| 8 | Octal | 377 |
| 10 | Decimal | 255 |
| 16 | Hexadecimal | FF |
| 36 | Base-36 | 73 |
No matter which base you choose, each row describes the same underlying integer: 255.
To keep the converter reliable and easy to use, it makes several assumptions and has a few limitations:
8 is not allowed in base 8, and the digit G is
not allowed in base 16.
-1011 or -FF).
As long as you stay within these assumptions—integer inputs, valid digits for the chosen base, and bases from 2 to 36—you can use this calculator to reliably convert between binary, octal, decimal, hexadecimal, base-36, and any other base in that range.