Number Base Converter
Convert between binary, octal, decimal and hexadecimal, and see the arithmetic that got there. Every digit, division and grouping below is worked out from the number you type.
101010 in binary is 42 in decimal.
About this tool
Converts a whole number or a fraction between binary, octal, decimal and hexadecimal, and shows the arithmetic that produced the answer rather than only the answer. Every place value, division and group of bits on the page is worked out from the number you typed, so the method is visible and can be checked by hand.
How to use it
- 1Choose the base you are starting from and the base you want, then type the number.
- 2Read the answer at the top; the working underneath shows how it was reached.
- 3Use the swap button to run the conversion back the other way, carrying the answer with it.
- 4Copy the result, or take any of the four bases from the row beneath it.
Good to know
The method changes with the direction
Because the shortest honest explanation does. Anything into decimal expands each digit by its place value and adds the results. Decimal into anything divides the whole part and multiplies the fraction. Binary and hexadecimal differ by a power of two, so bits are simply grouped in fours with no arithmetic at all, and octal and hexadecimal are converted through binary, which is the only base both of them line up with.
Fractions that never end
A tenth is exact in decimal and endless in binary. Rather than round it and print a value that is not equal to what you typed, the tool watches for a remainder it has seen before. When one comes back, the digits from that point repeat forever, and they are drawn with a line over them. Copied out, the repeating part is written in brackets instead, because an overline does not survive a clipboard.
Exact at any size
Values are held as exact integers rather than floating point, so a two-hundred-digit number converts without drifting in the last places. Past forty-eight rows the middle of the working is summarised, because nobody reads row four hundred, but the answer itself is never abridged.



