Number Base Converter
Convert between binary, octal, decimal and hexadecimal, instantly.
New to number bases? Read our guide →How number bases work
A number base (or radix) defines how many digits a positional numeral system uses. Hex is the dominant format for memory addresses, color codes, and byte values because one hex digit maps exactly to 4 bits (one nibble), and two hex digits represent one byte.
Reading binary and hex in code
You can separate digits with underscores for readability in many languages: 0b1111_0000, 1_000_000, 0xFF_A0. The copy button here outputs the standard prefix form ready to paste into code.
Common conversions for developers
Unix file permissions are written in octal: 755 means rwxr-xr-x (7=111, 5=101 in binary). CSS and HTML colors use hex: #RRGGBB where each channel is one byte (00-FF).
Network masks like 255.255.255.0 are 0xFFFFFF00 in hex. ASCII and Unicode code points are typically shown in hex: the letter A is 0x41 (decimal 65). IPv4 addresses are sometimes written as 32-bit hex integers: 192.168.1.1 = 0xC0A80101.