Base-N Number Converter (Bases 2–36)

JJ Ben-Joseph headshot JJ Ben-Joseph

What This Base-N Converter Does

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:

How Positional Number Systems Work

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:

N = i=0 d i · b i

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.

Supported Bases and Digit Symbols (2–36)

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:

How the Conversion Algorithm Works

Converting between bases is usually done in two steps:

  1. Parse the input number (as a string) in the source base to get its integer value.
  2. Rebuild the number in the target base using repeated division or built-in base conversion routines.

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.

Interpreting the Results

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:

For example:

Worked Example: Hexadecimal to Binary and Decimal

Suppose you want to convert the hexadecimal number 2A3 (base 16) into binary (base 2) and decimal (base 10).

Step 1: Interpret 2A3 in Base 16

In hexadecimal, the digits have the following values:

From left to right, 2A3 means:

2 × 162 + 10 × 161 + 3 × 160

Compute each part:

Add them together:

512 + 160 + 3 = 675.

So 2A316 = 67510.

Step 2: Convert 675 to Binary

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.

Comparison Table: One Value in Several Bases

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.

Limitations and Assumptions

To keep the converter reliable and easy to use, it makes several assumptions and has a few limitations:

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.

Paste an integer using digits 0-9 and letters A-Z. Negative numbers start with a minus sign.

Enter the radix of your original number. Common values include 2, 8, 10, and 16.

Choose the target radix. The converter formats the answer using upper case letters for digits above nine.

Enter a number, choose bases, and convert.

Embed this calculator

Copy and paste the HTML below to add the Base-N Number Converter to your website.