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.