Number base converter
Enter a number in any base — binary, decimal, octal or hex — and see it converted to all four at once.
Four bases at once
Programmers move between number bases constantly: decimal for everyday maths, binary for bit-level work, hexadecimal for colours, memory addresses and byte values, and occasionally octal for things like Unix file permissions. Pick the base you're starting from, type your value, and all four representations appear together. Tap any result to copy it.
Why hex and binary matter
Hexadecimal is popular because each hex digit maps neatly to exactly four binary bits, making it a compact, readable stand-in for binary — which is why colour codes (#FF8800) and byte values use it. Seeing a number in all bases side by side makes those relationships obvious and saves you from reaching for a calculator or writing a quick script.
A worked example and what the prefixes mean
Take decimal 255. In binary that's 11111111 (eight 1-bits), in octal 377, and in hexadecimal FF — one full byte, which is why FF shows up everywhere from colour channels to memory dumps. The prefixes you'll see in code label which base a literal is written in: 0x means hexadecimal (0xFF = 255), 0b means binary (0b11111111 = 255), and 0o (or a bare leading 0 in older C) means octal (0o377 = 255).
You'll meet these bases in real work: hex for CSS colours and hashes, binary for bitmasks and flags, and octal for Unix file permissions like chmod 755, where each digit encodes three permission bits.