Number Base Converter

Inputs stay on your device

Number Base Converter

Each base groups by a different power: 2 for binary, 8 for octal, 10 for decimal and 16 for hexadecimal.

Your result will appear here. Enter values and calculate.

Pick the base, type the number

Tell the converter which base your number is already written in, then type it. Decimal is the everyday base 10, binary is base 2 with only 0 and 1, octal is base 8, and hexadecimal is base 16, which uses the digits 0 to 9 and then the letters A to F.

The input is forgiving about formatting. A leading 0x on a hex value or 0b on binary is stripped automatically, so you can paste a value the way code would write it.

Every base at once

Rather than asking for a target base, the calculator simply shows your number in all four at the same time. One conversion answers whatever pairing you actually needed.

That also makes it a quick learning aid. Seeing the same value as 255, 11111111 and FF next to each other does more to explain bases than any single conversion does on its own.

Bases are just grouping sizes

A base is nothing more than how many symbols you count through before adding a new column. Decimal rolls over every ten, binary every two, hexadecimal every sixteen. The quantity itself is identical in every base, only the way it is written down changes.

This is why conversion never loses information. Turning a decimal into binary and back returns exactly the number you started with, because you have only changed its clothing, not the number underneath.

255 in every base

The decimal number 255 is a good one to remember. In binary it is 11111111, eight ones in a row. In octal it is 377, and in hexadecimal it is FF.

That tidy spread is why 255 turns up so often in computing. It is the largest value a single byte can hold, which is also why color codes and older limits stop right there.

The mix-up that trips everyone

The classic error is reading digits in the wrong base. In hexadecimal, 10 means sixteen, not ten. In binary, 10 means two. The same two characters carry a different value depending on the base they live in.

Naming the base out loud avoids most of the trouble. If a value could be more than one base, the context usually tells you: a string of only 0s and 1s is almost certainly binary, and anything with a letter past 9 has to be hexadecimal.

Where each base lives

Binary is the native language of hardware, every value eventually a pattern of on and off. Hexadecimal is the human-friendly shorthand for it, since one hex digit packs neatly into four binary digits, which is how color codes and memory addresses are written.

Octal is the quieter one, still seen in Unix file permissions, where a number like 755 is really three octal digits describing who can read, write and run a file.

Number Base Converter FAQ

How do I convert binary to decimal?

Set the input base to binary and type the bits. The decimal value appears in the result, alongside the octal and hex forms.

For example, 1010 in binary is 10 in decimal.

How do I convert decimal to hexadecimal?

Leave the input base on decimal and enter the number. The hexadecimal form is listed in the result, using A through F for the values ten to fifteen.

Decimal 255 comes out as FF.

Why does hexadecimal use letters?

Each hex place needs sixteen distinct digits. After 0 to 9 there are only six left to invent, so hex borrows A, B, C, D, E and F to stand for ten through fifteen.

What is octal used for?

Octal groups bits in threes, which made it convenient on older hardware. Today it is most visible in Unix and Linux file permissions, like the 755 in a chmod command.

Can I convert very large numbers?

Up to the range a browser can hold as an exact whole number. Past that the converter warns you instead of returning a rounded, wrong answer.