Number Base Converter
Online number base converter. Type a number in any base (binary, octal, decimal or hexadecimal) and see it converted to the others instantly. Just enter a value in one of the fields and the rest are filled in automatically with the converted results.
What are number bases?
Number bases (or numeral systems) are ways of representing numbers with different sets of symbols. The most common one is base 10 (decimal), which we use every day. In computing, other bases are widely used, such as base 2 (binary), base 8 (octal) and base 16 (hexadecimal). Each base defines how many symbols can be used to write numbers.
How does number base conversion work?
Converting between number bases means rewriting a number from one base into an equivalent number in another. For example, a binary number can be converted to decimal, hexadecimal or octal: the value stays the same, only its representation changes.
How to convert between number bases
- Convert to decimal (base 10) — Multiply each digit by the matching power of the base and add up the results.
- Convert from decimal to another base — Repeatedly divide the number by the target base and use the remainders to build the result.
- Direct conversions — Some conversions can be done by grouping bits (especially between bases 2, 8 and 16).
Conversion examples
- Binary to decimal: 1010 (base 2) = 10 (base 10)
- Decimal to hexadecimal: 255 (base 10) = FF (base 16)
Main number bases
- Base 2 (Binary): uses only 0 and 1
- Base 8 (Octal): uses digits 0 to 7
- Base 10 (Decimal): uses digits 0 to 9
- Base 16 (Hexadecimal): uses 0 to 9 and letters A to F
Where are number bases used?
- Binary (base 2): used in computers and electronics
- Octal (base 8): used in older systems and some specific applications, such as Unix file permissions
- Decimal (base 10): used in everyday life
- Hexadecimal (base 16): used in programming, colors and memory addresses
Frequently asked questions
How do I convert binary to decimal?
Multiply each digit by 2 raised to its position, counting from zero on the right, and add everything up. 1011 = 8 + 0 + 2 + 1 = 11.
How do I convert decimal to binary?
Divide the number by 2 repeatedly and write down the remainders. Read from bottom to top, the remainders form the binary number.
What is hexadecimal used for?
Hexadecimal is a compact way to write binary numbers: each digit represents 4 bits. It is used in CSS colors, memory addresses and error codes.