Number Base Converter
Enter a whole number in any base from 2 to 36, including very large numbers, and see it in binary, octal, decimal, hexadecimal and the base you choose.
Questo contenuto è in inglese.
Esempi svolti
Decimal 255 in other bases
255 in base 10
Base 2: 11111111 Base 8: 377 Base 16: FF
Each base uses its own digits, so 255 is written with eight binary digits, three octal digits and two hexadecimal digits.
Hexadecimal 1A as decimal
1A in base 16
Base 10: 26
The letter A stands for ten, so 1A is one sixteen plus ten, which is 26.
Informazioni su Number Base Converter
Most people count in base 10, using the digits 0 to 9, but computers work in base 2, which uses only 0 and 1. Programmers also rely on base 8 and base 16, because they are shorter ways of writing binary. Base 16, or hexadecimal, is used for colour codes, memory addresses and error messages, while base 8, or octal, still appears in file permissions on many systems. This converter takes a whole number in any base from 2 to 36 and shows it in binary, octal, decimal and hexadecimal at once, with a further row for any other base you choose.
Ordinary calculators stop being accurate when numbers become very large, but this tool uses exact whole-number arithmetic. That means a value such as two to the power of one hundred keeps every one of its digits, whatever base you convert it to. Digits above nine use the letters A to Z, so base 36 uses every letter and number, and a leading minus sign is accepted for negative values. Decimal results are grouped with commas to make long numbers easier to read at a glance.
Come usare Number Base Converter
- Type the number into the Number box, using the digits and letters that its base allows.
- Set the base it is written in, from 2 for binary to 36 for the full set of letters and digits.
- Read the binary, octal, decimal and hexadecimal rows, which update as you type.
- Choose any other base in the lower box to see the number in that base as well.
Usi comuni
- Turning a hexadecimal colour code or memory address into decimal
- Working out which bits are set in a binary flag value
- Converting a file permission such as 755 into a readable form
- Checking very large powers of two without losing digits
Domande frequenti
How do I convert a hexadecimal number to decimal?
Type the hexadecimal number into the Number box and set the base to 16. The decimal row shows its value straight away. For example, ff in base 16 gives 255 in decimal. Each hexadecimal digit stands for a value from 0 to 15, with A standing for 10 and F for 15, and the total is worked out by place value.
What is the highest base this converter supports?
The converter supports bases from 2 to 36. Base 36 uses the digits 0 to 9 and the letters A to Z, which gives 36 symbols in total. Bases above 10 are useful for compact identifiers, because they fit more information into fewer characters than decimal does.
Can it handle very large numbers?
Yes. Calculations use exact whole-number arithmetic, so no digits are lost even for numbers with hundreds of digits. The tool accepts up to 2,000 digits in a single number. Decimal points and fractions are not supported, so enter whole numbers only.
Why do some results show a leading minus sign?
A minus sign at the start of the number makes it negative, and the result keeps that sign in every base. Negative numbers are written the same way in binary, octal, decimal and hexadecimal, with only the digits changing. Leave the minus sign out to convert a positive number.
Does a prefix like 0x or 0b change the result?
A prefix is accepted when it matches the base you have chosen, so 0x is removed for base 16, 0b for base 2 and 0o for base 8. The prefix is just a label that shows the base in code, so it does not change the value. If the prefix does not match the base, the tool reports an invalid digit.