What is a number base?
A number base (or radix) defines how many unique digits a positional number system uses. The familiar everyday system is base 10 (decimal), which uses the digits 0–9. Computers work natively in base 2 (binary), using only 0 and 1 to represent electrical states. Octal (base 8) and hexadecimal (base 16) are compact shorthand representations that map closely to binary groups, making them popular in programming and low-level computing.
Why convert between bases?
Base conversion is essential in computer science and software development. Hexadecimal is used for memory addresses, color codes (like #2563eb in CSS), and bytecode. Binary is the language of processors — every CPU instruction, every pixel, every character is ultimately stored as 1s and 0s. Octal was common in older Unix file permissions (e.g. chmod 755). Understanding all four bases makes reading technical documentation, debugging, and hardware programming much easier.
How this tool works
Enter a number in any of the four supported bases, select the input base from the dropdown, and the tool instantly shows all four representations. Internally it uses JavaScript's built-in parseInt(value, base) to parse the number into a standard decimal integer, then calls .toString(base) to produce each output. Hexadecimal output is displayed in uppercase for readability. Input is validated to reject characters that are illegal for the selected base — for example, a '9' in binary input will trigger an error.
Common use cases
Convert CSS hex color codes to their decimal RGB components. Check what a binary CPU register value looks like in hex. Verify file permission octal values in Unix systems. Decode memory addresses shown in hexadecimal during debugging sessions. Explore how large numbers grow in binary representation versus their decimal form.