Radix Converter Online — Binary / Octal / Decimal / Hexadecimal
Enter a number in any base and see all four bases at once
About Radix Conversion
This tool converts freely among four bases: binary (0-1), octal (0-7), decimal (0-9) and hexadecimal (0-9/A-F). Key feature: enter a number in one base and the equivalents in all four bases update at once, with no repeated conversions. For example, entering decimal 255 instantly shows binary 11111111, octal 377 and hexadecimal FF. All conversion runs locally in your browser with no data uploaded. For HEX ↔ RGB color conversion, use the Color Converter.
Use Cases
- Programming and debugging: inspect a variable’s binary or hexadecimal form in memory, and convert quickly when debugging bitwise operations, network protocols or encoding issues.
- Color value conversion: CSS RGB and HEX are essentially decimal and hexadecimal views of the same value, e.g. RGB(255,0,0) ↔ #FF0000.
- IP addresses and subnet masks: each IPv4 octet is 0-255 (decimal), matching 8 binary bits. A subnet mask such as 255.255.255.0 = 11111111.11111111.11111111.00000000.
- Learning computer networks: understand MAC addresses (hex), network port numbers (decimal in protocol headers) and ASCII codes (characters as decimal/hex).
FAQ
Where is each of the four bases used?
Binary (0/1): low-level computer storage and logic, network subnetting. Octal (0-7): Unix/Linux file permissions (e.g. chmod 755). Decimal (0-9): everyday arithmetic and counting. Hexadecimal (0-9/A-F): memory addresses, color values, MAC addresses, Unicode code points and more.
How do I convert decimal to binary by hand?
Use the "divide by 2 and take remainders" method: repeatedly divide the decimal number by 2, recording the remainder (0 or 1) each time until the quotient is 0, then read the remainders from bottom to top. For example, 13 → 13÷2=6 remainder 1 → 6÷2=3 remainder 0 → 3÷2=1 remainder 1 → 1÷2=0 remainder 1 → result 1101.
What do the letters A-F mean in hexadecimal?
A=10, B=11, C=12, D=13, E=14, F=15. Hexadecimal is base 16, so six letters are needed to represent 10-15. Upper or lower case both work; this tool always outputs upper case.
Does it support negative numbers and decimals?
Built on parseInt/toString, this tool only converts integers. The binary form of a negative number (e.g. -255) involves two’s complement and depends on the bit width (8/16/32 bits). Decimal fractions (e.g. 0.1) involve precision issues — handle the integer and fractional parts separately, or watch for a future update.