Number Base Converter
Convert instantly between binary, octal, decimal, hexadecimal and any base from 2 to 36. See the result with proper prefix notation and bit representation.
Why Number Bases Matter in Programming
Computers work in binary (base 2) at the hardware level. Hexadecimal (base 16) is a convenient shorthand — one hex digit represents exactly 4 binary bits, making it easy to read memory addresses, colour codes and bitmasks. Octal (base 8) appears in Unix file permissions. Understanding how to move between these representations is a fundamental programming skill.
Reading Prefixes
Programming languages use standard prefixes: 0b for binary (0b1010), 0o for octal (0o12), and 0x for hexadecimal (0xFF). These tell the compiler or interpreter which base the literal is in. This tool displays the correct prefix for each output so you can paste directly into code.