Number Base Converter

Convert a number between binary, octal, decimal, and hexadecimal. Enter a value, tell the converter what base it's in, and see it in all four bases at once.

Decimal
Binary
Octal
Hexadecimal

How number bases work

Every base assigns place values that are powers of that base. In decimal each column is a power of 10; in binary, a power of 2. Reading binary 1101 as place values gives 8 + 4 + 0 + 1 = 13 in decimal.

Binary 2 · Octal 8 · Decimal 10 · Hexadecimal 16

Which digits each base uses

Hexadecimal is popular in computing because one hex digit maps to exactly four binary digits, so 255 is FF in hex and 11111111 in binary — a tidy single byte.

Frequently asked questions

How do I convert decimal to binary?

Repeatedly divide the decimal number by 2 and record the remainders, then read them bottom to top. For example, 13 in binary is 1101. This converter does it instantly and shows the octal and hexadecimal forms as well.

How do I convert binary to decimal?

Each binary digit represents a power of two. Add up the place values where there is a 1: 1101 is 8 + 4 + 0 + 1 = 13. The rightmost digit is the ones place, then twos, fours, eights, and so on.

What is hexadecimal used for?

Hexadecimal (base 16) is a compact way to write binary, since each hex digit equals exactly four binary digits. It is widely used for colors in web design (like #FF0000), memory addresses, and byte values in programming.

What digits does each base use?

Binary uses 0–1, octal uses 0–7, decimal uses 0–9, and hexadecimal uses 0–9 plus A–F (where A=10 through F=15). Entering a digit that is too large for the chosen base is invalid — a 2 is not allowed in binary, for instance.

Can this convert negative numbers or fractions?

This converter handles non-negative whole numbers, which covers the vast majority of base-conversion needs. Fractional and signed (two's complement) representations follow different rules and are not included here.

Disclaimer: Handles non-negative whole numbers. Very large values may lose precision beyond what standard numbers can represent. Provided for educational purposes.