Number Base Converter

Convert a number between binary, octal, decimal and hexadecimal instantly.

What number base conversion is for

Number systems like binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16) show up constantly in programming — from memory addresses and CSS colors (hex) to Unix file permissions (octal) and internal data representations (binary).

How it works

Type the number in the selected source base (for example FF in hexadecimal or 11111111 in binary) and instantly see its representation in the other three bases.

Examples to check against

Decimal 255 is FF in hex, 377 in octal and 11111111 in binary. Binary 101010 is 42 in decimal, 2A in hex and 52 in octal.

Hex and octal as shortcuts for binary

One hex digit maps to exactly 4 bits and one octal digit to 3. That is why the common chmod value 755 reads as 111 101 101 in binary: rwx for the owner, r-x for group and others. Converting a long binary string by hand is easiest if you group the bits in fours from the right.

Typing mistakes

What each position is worth

In binary the weights from right to left are 1, 2, 4, 8, so 1011 is 8 + 0 + 2 + 1 = 11. In hexadecimal, 2F is 2 × 16 + 15 = 47. Knowing this arithmetic lets you double-check any result without the tool.

Frequently asked questions

Why is FF in hexadecimal equal to 255 in decimal?

Because each hex digit represents 4 bits (16 possible values, 0 to F), and F=15, so FF = 15×16 + 15 = 255.

Can I enter negative numbers?

No — this tool only works with non-negative integers.