Convert numbers between binary, octal, decimal and hexadecimal. Type a number, choose its base, and see it in all four.
| Binary | – |
| Octal | – |
| Hexadecimal | – |
How it works
Each digit in a base-b number is worth a power of b. Decimal is base 10, binary is base 2 (digits 0 and 1), octal is base 8 (0 to 7) and hexadecimal is base 16 (0 to 9 and A to F). The tool reads your number in the chosen base and writes it out in the others. It works for whole numbers up to about 9 quadrillion.
Example
Decimal 255 is 11111111 in binary, 377 in octal and FF in hexadecimal.
Frequently asked questions
How do I convert binary to decimal?
Add up the powers of two for every 1 digit. 1101 is 8 + 4 + 1 = 13.
Why is hexadecimal used in computing?
One hex digit represents four binary digits, so it is a compact way to write binary values such as colours and memory addresses.
Does it handle negative or fractional numbers?
No. Only non-negative whole numbers.
More free tools: Color converter · Roman numeral converter · All free tools
This tool is for general use.