Number Base Converter (Base 2 to 36)

Convert any number between bases 2 and 36 with positional expansion and repeated-division working. To convert between any two bases, go through decimal. Example: with number 255, from base 10, to base 16, the result is Base 16 result = FF; Decimal value = 255; Binary = 11111111.

Last updated · By · Runs in your browser, nothing is uploaded

Result

Step-by-Step Solution

Enter your values above to see the full working.

How do you use the Number Base Converter (Base 2 to 36)?

Type your number, choose the base it is currently written in and the base you want. Any base from 2 to 36 is supported, using digits 0 to 9 and letters A to Z for values 10 to 35. For example, enter 255 with from-base 10 and to-base 16 to get FF.

The result also shows the decimal, binary and hexadecimal values so you can compare several bases at once. The solution box shows both stages of the conversion: expanding to decimal and dividing down to the new base.

What formula does the Number Base Converter (Base 2 to 36) use?

To convert between any two bases, go through decimal. Stage one expands the original number using place values: Σ dᵢ × bⁱ, where b is the original base. Stage two repeatedly divides the decimal value by the target base and records the remainders. Reading the remainders from last to first gives the digits of the answer.

For example, to write 255 in base 16, divide: 255 ÷ 16 = 15 remainder 15, then 15 ÷ 16 = 0 remainder 15. Both remainders are 15, which is F, giving FF. Because the arithmetic uses exact big integers, there is no precision loss even for very large numbers.

Worked examples across bases

1010 in base 2 equals 10 in decimal, which is 12 in octal (base 8) and A in hex. ZZ in base 36 is 35 × 36 + 35 = 1,295. The decimal number 100 becomes 1100100 in binary, 144 in octal and 64 in hex. Every conversion is reversible: converting the result back gives your original number, which is a good way to check your understanding.

Why different bases exist

Base 2 matches the on-off nature of electronics. Base 8 and base 16 are compact ways of writing binary, because one octal digit is three bits and one hex digit is four bits. Base 36 uses every digit and letter and is popular for short identifiers, URL shorteners and compact encodings of large numbers.

Historically, other bases have appeared in human cultures too: base 12 in the dozen, base 60 in time and angles, and base 20 in some counting systems. The method for converting between them is always the same.

What are the most common mistakes with the Number Base Converter (Base 2 to 36)?

  • Using a digit that is too large for the base, such as 9 in an octal number or 2 in binary.
  • Reading the base-conversion remainders in the order you calculated them instead of reversing them, which flips the digits.
  • Forgetting that letters are digits in bases above 10, with A = 10 through Z = 35.
  • Mixing up the base a number is written in with the base you want to convert to.

What Is the Tested Example for the Default Values?

This example is computed by the same code that powers the calculator above, so you can compare it with your own numbers or a textbook answer.

Input: Number255
Input: From base10
Input: To base16
Base 16 resultFF
Decimal value255
Binary11111111
HexadecimalFF

Where Can You Verify These Formulas?

The definitions and formulas on this page follow standard references. Check them against these sources:

Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.

Frequently Asked Questions

How do you convert a number from one base to another?

Convert it to decimal using place values, then divide repeatedly by the target base and read the remainders from last to first.

What digits are used above base 10?

Letters. A is 10, B is 11 and so on up to Z, which is 35, so bases up to 36 are possible with digits and letters.

Why is base 16 so common in programming?

One hex digit equals exactly four bits, so a byte is two hex digits. It is a compact and readable form of binary.