Base Converter
Convert a number between binary, octal, decimal and hexadecimal.
Enter your details below.
How to use
- Enter the number to convert.
- Pick the base it is currently in and the base you want.
- Press Convert to see the result.
About this tool
Different bases count the same value with different digits: binary uses only 0 and 1, octal uses 0 to 7, decimal uses 0 to 9, and hexadecimal adds letters A to F. This tool converts a whole number from any of those bases to any other, and rejects digits that do not belong in the chosen base. It handles whole numbers only, not fractions, and very large numbers may lose precision because of how JavaScript stores numbers.
Frequently asked questions
What digits can I use in hexadecimal?
Digits 0 to 9 plus letters A to F, in either upper or lower case. Letters beyond F are not valid hex digits.
Can I convert fractions like 10.5?
No. This tool converts whole numbers only. Fractions need a separate fractional conversion, since the part after the point works differently.