Representation
Base converter
Rewrite an integer in any base from 2 to 36, with the decimal value shown alongside.
Digits run 0-9 then a-z. A leading minus sign is kept.
- base 10255 base 10
- 255
- base 16255 base 10
- FF
Calculator
Convert a whole number between any two bases from 2 to 36, including binary, octal, decimal and hexadecimal.
What is in here
Calculators
Six calculators that run entirely in this browser. Inputs are validated, so a rejected entry says what is wrong instead of returning a confident wrong answer.
Representation
Rewrite an integer in any base from 2 to 36, with the decimal value shown alongside.
Digits run 0-9 then a-z. A leading minus sign is kept.
A base, or radix, is how many digits a positional numeral system uses. Base 2 uses 0 and 1, base 10 uses 0 to 9, and base 16 adds A to F for the values ten to fifteen. The same quantity has a different spelling in each: 255 in base 10 is 11111111 in base 2 and FF in base 16.
Enter the value, the base it is written in and the base you want. Letter digits are accepted in either case, and a leading minus sign is preserved. Any digit that does not exist in the source base is rejected with a message rather than silently dropped, so a typo cannot become a confident wrong answer.
Conversion runs in arbitrary precision integers, so a full 64-bit hexadecimal value converts exactly instead of losing digits past 2 to the power of 53. Fractional values are not supported: this converter is for whole numbers, and it says so rather than treating the decimal point as an invalid digit.
Worked example
Value FF, from base 16, to base 2FF base 16 = 255 base 10 = 11111111 base 2Each hexadecimal digit maps onto exactly four binary digits, which is why hex is used as shorthand for binary.
Questions
Enter the value with 16 as the source base and 2 as the target base. By hand, replace each hexadecimal digit with its four binary digits: F becomes 1111, so FF becomes 11111111.
Any base from 2 to 36 in either direction. Base 36 is the limit because it uses the ten digits plus the twenty-six letters of the alphabet, and there is no standard digit after z.
No. The converter handles whole numbers only, and rejects a value containing a decimal point with a message saying so. Negative whole numbers are fine and keep their sign.