Number base converter
Choose which number system to convert from and to, and type a number. You get the answer, the number in all four systems and how to work it out yourself. Even numbers with hundreds of digits are converted exactly.
Whole numbers, even very large ones. A 0x, 0b or 0o prefix is fine; spaces are ignored.
Fill in the fields; the answer appears here straight away.
How it's worked out
How it works
-
Enter the values
Type the numbers or the formula. Decimals may use a point or a comma. No idea? Click Fill in an example.
-
Instant answer
The answer appears as you type, with the most important intermediate values.
-
See the working
Under "How it's worked out" you see the steps, handy for checking your own calculation.
Four number systems
- Decimal (10): our everyday system with the digits 0 to 9.
- Binary (2): only 0 and 1. This is how computers count; every digit is a bit. 1111 1111 is 255.
- Octal (8): the digits 0 to 7, used for example for file permissions in Linux (chmod 755).
- Hexadecimal (16): 0–9 and A–F (A = 10 … F = 15). One hex digit is exactly 4 bits, so FF is 1111 1111. You know it from colour codes such as #FF8800.
Converting to decimal
Every digit is worth a power of the base. Binary 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11. Hexadecimal 2F = 2×16 + 15 = 47.
Converting decimal to binary
Keep dividing the number by 2 and write down the remainder, until you reach 0. Then read the remainders from bottom to top. 13 ÷ 2 = 6 remainder 1, 6 ÷ 2 = 3 remainder 0, 3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1, so 13 is 1101 in binary. For octal and hexadecimal, divide by 8 or 16. A prefix such as 0x, 0b or 0o is fine, and spaces are ignored.
Frequently asked questions
Is the number base converter free?
Yes. The number base converter is completely free, with no account, sign-up or usage limit.
How accurate is the result?
The tool calculates with your browser's number precision. For important calculations, always double-check what you entered.
Does it work on my phone?
Yes. The tool works in any modern browser on a phone, tablet or computer.