Convert whole numbers between binary, octal, decimal and hexadecimal instantly, with a full base reference table.
Numbers • binary · octal · decimal · hex
Decimal, binary, octal and hexadecimal in one place, with the base-10 value shown alongside so the weight of each digit position can be checked rather than taken on trust.
Results are recalculated on every keystroke, with no submit step and no page reload, so a value can be adjusted until the answer looks right rather than guessed once.
Everything runs in your browser — no account, no uploads, nothing leaves your device.
Programmers and students constantly convert between number systems: binary (base 2, used by digital hardware), octal (base 8), decimal (base 10, everyday numbers) and hexadecimal (base 16, used for colors, memory addresses and byte values). This converter handles all four directions and shows the value in every base at once.
Common examples: decimal 255 = binary 11111111 = octal 377 = hex FF. Decimal 16 = hex 10. The hex color #FFFFFF is three bytes, each 255 in decimal.
Positional number systems all work the same way: each digit is multiplied by the base raised to its position, counting from zero on the right. Only the base and the digit set change. Converting to decimal is a sum of those place values; converting from decimal is repeated division by the target base, reading the remainders in reverse. Bases that are powers of two — binary, octal, hexadecimal — convert between each other without any arithmetic at all, because each hex digit maps to exactly four bits and each octal digit to three. That property is the entire reason hexadecimal is used in computing.
Decimal value = Σ (digit × base^position)To base n: divide repeatedly by n, read remainders bottom-upHex digits: 0–9 then A=10, B=11, C=12, D=13, E=14, F=15where:
Assumptions: Unsigned integers. Fractional parts convert by repeated multiplication rather than division, and many decimal fractions — 0.1 among them — are non-terminating in binary, which is the root of floating-point rounding surprises.
Convert one decimal number into three bases, then use the power-of-two shortcut.
Result255 = FF₁₆ = 11111111₂ = 377₈
This is why colour codes look like #FF0000: each pair of hex digits is one byte, 0 to 255, for red, green and blue. Two hex characters express a full byte compactly, which no other convenient base does.