Number Base Converter
Convert numbers between binary, octal, decimal and hexadecimal, and see each value side by side — a handy free tool for programming and CS homework.
By CalcLumen · Reviewed by Igor Zagorodnyi · Updated · How we check our math
| Base | Value |
|---|---|
| Binary | 1010 |
| Octal | 12 |
| Decimal | 10 |
| Hexadecimal | A |
This number base converter changes a whole number between binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). Type a value, pick the base it is written in and the base you want, and the converted result appears instantly together with a table showing the number in all four bases.
The conversion works by reading your input in its source base to get its plain decimal value, then re-expressing that value in the target base. Only digits that are valid for the source base are accepted — 0 and 1 for binary, 0 to 7 for octal, 0 to 9 for decimal and 0 to 9 plus A to F for hexadecimal — so an invalid entry shows a dash instead of a result.
How to use the number base converter
- 1Enter the number you want to convert.
- 2Choose the base your number is currently written in.
- 3Choose the base you want to convert to.
- 4Read the converted value, and use the table to compare the number across binary, octal, decimal and hexadecimal.
Number base questions, answered
What is 1010 in binary as a decimal number?+
Binary 1010 equals decimal 10. Reading right to left, the set bits are worth 2 and 8, and 2 + 8 = 10.
Why is my entry showing a dash?+
The value contains a digit that is not valid for the selected from-base. For example, the digit 2 is not allowed in binary and the letter G is not allowed in hexadecimal. Remove the invalid character to see a result.
What are the valid digits for each base?+
Binary uses 0 and 1, octal uses 0 through 7, decimal uses 0 through 9, and hexadecimal uses 0 through 9 plus the letters A to F.
Tools & software you may like
Some of these are affiliate links — we may earn a commission at no extra cost to you.
Related calculators
Convert length, weight, temperature, volume, area and speed between metric and imperial units instantly, with the conversion factor shown for every pair.
Convert between 30+ world currencies with indicative daily exchange rates, see the rate used and the reverse conversion, and compare amounts side by side.
Convert fuel economy between US MPG, UK MPG, km/L and liters per 100 km — compare car efficiency across different measurement systems.
Convert cooking volumes between cups, tablespoons, teaspoons, milliliters, fluid ounces and pints, US and metric, with a table of common amounts.