Binary Converter
Convert any IPv4 address to its binary, hexadecimal, and decimal representations. See a per-octet breakdown with color-coded bits for easy understanding of how IP addresses are structured at the binary level.
Understanding IP Address Binary Conversion
Every IPv4 address is a 32-bit number, typically written in dotted-decimal notation (e.g., 192.168.1.1). Each of the four octets represents 8 bits, giving a range of 0 to 255 per octet. Converting between decimal and binary is fundamental to understanding subnetting, routing, and network addressing.
Binary conversion is the foundation of subnetting. When you divide a network into subnets, you are manipulating bits at the binary level. The subnet mask determines which bits represent the network portion and which represent the host portion. Understanding binary makes it easy to see why a /24 has 256 addresses (28), a /16 has 65,536 (216), and so on.
How to Convert an IP to Binary
To convert an IP address to binary manually, convert each octet separately. Take the decimal value, divide it by 2 repeatedly, and collect the remainders from bottom to top. For example, 192 in binary is 11000000: 192 ÷ 2 = 96 remainder 0, 96 ÷ 2 = 48 remainder 0, 48 ÷ 2 = 24 remainder 0, 24 ÷ 2 = 12 remainder 0, 12 ÷ 2 = 6 remainder 0, 6 ÷ 2 = 3 remainder 0, 3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1. Reading the remainders upward gives 11000000.
Once you have the 32-bit binary string, you can also convert it to hexadecimal by grouping every 4 bits into a hex digit. Understanding these conversions is essential for working with subnet masks, designing IP plans, and configuring network devices. Network engineers read binary when analysing packet captures in Wireshark, verifying ACL behaviour, or troubleshooting routing updates. Use this tool alongside the Subnet Calculator to deepen your understanding of IP addressing.
From Binary to Hexadecimal
Once you have the 32-bit binary representation, converting to hexadecimal is straightforward: group every 4 bits into a single hex digit. For example,11000000.10101000.00000001.00000001 becomes0xC0A80101. Hexadecimal is commonly used when working with IPv6 addresses (128 bits represented as 32 hex digits), MAC addresses (48 bits as 12 hex digits), and in network configuration files. Understanding this conversion helps bridge the gap between IPv4 and IPv6 network management, especially during dual-stack deployments where both address families coexist. Network engineers working with Wireshark packet captures regularly read hexadecimal to identify protocol flags, while firewall administrators use hex notation when configuring advanced ACL rules.