Base-N Converter (2-36)

Convert to any base you need.

Result

2N9C

How it is calculated

The tool writes a non-negative whole number in any base b from 2 to 36. It repeatedly divides by b and collects the remainders: n = dk·bk + … + d1·b + d0, where each digit satisfies 0 ≤ d < b. Remainders 0–9 are printed as digits and 10–35 as the capital letters A–Z. Only the final digit string is shown, not the division steps. Zero converts to 0. Both boxes must be whole numbers: a negative number, a fraction such as 7.5, or a base below 2 or above 36 shows no result. The number is held exactly as an integer only up to 253 (9,007,199,254,740,992), so anything larger is rejected rather than converted with rounding errors, even when typed digit for digit (9007199254740993 gives no result).

Worked example

Convert 123456 to base 36. 123456 ÷ 36 = 3429 remainder 12 (letter C). 3429 ÷ 36 = 95 remainder 9. 95 ÷ 36 = 2 remainder 23 (letter N). 2 ÷ 36 = 0 remainder 2. Reading the remainders from last to first gives 2, N, 9, C, so the tool prints 2N9C. Check by expanding: 2 × 363 + 23 × 362 + 9 × 36 + 12 = 93312 + 29808 + 324 + 12 = 123456.

Try this example →

Common mistakes

  • Reading the remainders in the order they were produced. The first remainder is the last digit, so the string is read from the bottom up.
  • Confusing the letters with ordinary text. A means 10, B means 11 and so on up to Z for 35, and the output is always in capitals.
  • Swapping the two boxes. Number 16 in base 255 is not the same as number 255 in base 16; the first box is the decimal value, the second is the target base.
  • Entering a negative number or a fraction. Neither is converted, so use the two's complement tool for negatives and convert the fractional part separately.
  • Pasting a number above 253 (16 digits or more) and expecting a long answer. Such inputs give no result, so split or verify very long numbers another way.

About this calculator

A number's base (or radix) determines how many distinct digits it uses and what each position in the number is worth: base 10 (decimal) uses digits 0-9 with each place worth a power of ten, base 2 (binary) uses only 0 and 1 with each place worth a power of two, and base 16 (hexadecimal) uses 0-9 plus A-F with each place worth a power of sixteen. Any whole number can be represented in any base from 2 up to 36 by using digits 0-9 followed by letters A-Z to stand in for values 10 through 35.

Programmers convert to binary and hexadecimal constantly — binary maps directly onto how bits are stored in memory, while hex is a compact, human-readable way to write byte values, colors (like #FF5733) and memory addresses. Base 36 is popular for generating short, case-insensitive identifiers such as URL shorteners or order codes, since it packs more information into fewer characters than decimal. Mathematicians and computer science students also use less common bases like 3 or 7 to study positional number systems and algorithms such as repeated division-and-remainder conversion.

This calculator takes a whole, non-negative decimal number and converts it into any base you choose between 2 and 36, showing the resulting digit string. It uses that repeated division method internally but shows only the final result, not the individual division steps.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators