Base-N Number Converter
A number base, or radix, sets how many digits a positional system uses: decimal uses ten, binary two, hexadecimal sixteen. This converter takes a whole number written in any base from 2 to 36 and rewrites it in any other base in that range. It interprets your input as a value, then expresses that value with the target base's digits, using letters A to Z for digit values above 9. It is built for programming, digital electronics, and number-system study where binary, octal, decimal and hex conversions are routine.
Base conversion method
value = sum of digit_i * base_from ^ position_i
then repeatedly: digit = value mod base_to; value = floor(value / base_to)
read remainders in reverse for the target-base digits
Example: 255 (base 10) = FF (base 16)
Digit values 10 to 35 are written as the letters A to Z. The decimal value column shows the same number in base 10 as a cross-check.
Number base context
- Base 2 (binary) uses 0 and 1; base 8 (octal) uses 0 to 7.
- Base 16 (hexadecimal) uses 0 to 9 then A to F; one hex digit equals 4 bits.
- Bases up to 36 use all ten digits plus the 26 letters A to Z.
- This tool converts non-negative whole numbers only.
- An invalid digit for the source base, or a base outside 2 to 36, returns n/a.
Base-N converter: frequently asked questions
What is a number base?
A number base, or radix, is how many distinct digits a positional number system uses. Decimal is base 10 (digits 0 to 9), binary is base 2 (0 and 1), and hexadecimal is base 16 (0 to 9 then A to F). Each digit position represents a power of the base.
How do you convert between bases?
First interpret the input digits as a value by summing each digit times the base raised to its position. Then repeatedly divide that value by the target base, collecting remainders, to build the output digits. This calculator does both steps for you.
What bases does this support?
Any base from 2 to 36. Bases above 10 use letters A to Z for digit values 10 to 35, which is the standard alphanumeric radix convention also used by JavaScript's number parsing.
Why is hexadecimal base 16 common in computing?
Each hex digit maps exactly to 4 binary bits, so a byte (8 bits) is two hex digits. This makes hexadecimal a compact, readable way to write binary values used in memory addresses, color codes and machine data.
Does this handle decimals or negative numbers?
This converter works on non-negative whole numbers (integers). Fractional parts and negative signs are not converted. Enter the magnitude as a whole number in its source base.
Official sources
- NIST Digital Library of Mathematical Functions: DLMF home.
- NIST: National Institute of Standards and Technology.
Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.