IPv4 ↔ Binary Converter

Convert IPv4 addresses to/from binary notation

Input IPv4 Addresses

Converts IPv4 addresses to their binary representation with dots between octets.

Conversion Results

Conversion results will appear here

The IPv4 to Binary Converter transforms IPv4 addresses between dotted decimal notation and their 32-bit binary representation. Enter an address like 192.168.1.1 to see its binary form 11000000.10101000.00000001.00000001, or paste a 32-bit binary string to convert it back to dotted decimal. The tool displays each octet separately, making subnet boundaries and network/host bit divisions instantly visible.

Understanding Binary IP Addressing

If you work with networks at any level -- configuring switches, writing firewall rules, planning subnets, or troubleshooting connectivity -- binary is the language that makes everything click. Every IPv4 address is a 32-bit number. The dotted decimal format we type into configuration files is just a human convenience that groups those 32 bits into four chunks of 8. Routers, switches, and operating system kernels never see 192.168.1.1; they see a stream of ones and zeros and apply bitwise operations to decide where to send each packet.

The reason binary matters for day-to-day work is subnetting. When you apply a subnet mask to an address, what actually happens is a bitwise AND operation between the address and the mask. In decimal, a /27 mask is 255.255.255.224, which tells you almost nothing at a glance. In binary, it is 11111111.11111111.11111111.11100000 -- and you can immediately see that the last five bits are host bits, giving you 2^5 = 32 addresses in the subnet. Once you develop an intuition for reading binary, subnet math stops being something you have to look up and becomes something you can reason about on the spot.

This converter handles both directions. Give it a dotted decimal address and it shows the full 32-bit binary with clear octet separation. Give it a binary string and it produces the decimal equivalent. Whether you are studying for a certification exam, teaching a class, or double-checking a subnet boundary in production, the tool eliminates the manual arithmetic and lets you focus on understanding the result.

How to Convert an IPv4 Address to Binary

  1. Enter an IPv4 address in standard dotted decimal notation (e.g., 192.168.1.1)
  2. The tool converts each of the four octets into its 8-bit binary equivalent
  3. View the full 32-bit binary output with dots separating each octet group
  4. To convert binary back to decimal, enter a 32-bit binary string and get the dotted decimal result

IPv4 to Binary Conversion Examples

IPv4 AddressBinary Representation
192.168.1.111000000.10101000.00000001.00000001
10.0.0.100001010.00000000.00000000.00000001
255.255.255.011111111.11111111.11111111.00000000
172.16.0.010101100.00010000.00000000.00000000
0.0.0.000000000.00000000.00000000.00000000
255.255.255.25511111111.11111111.11111111.11111111
8.8.8.800001000.00001000.00001000.00001000

Octet-by-Octet Conversion

Each octet maps to 8 binary positions with the following place values:

Bit Position76543210
Place Value1286432168421

For example, the decimal value 192 = 128 + 64 = 11000000. The decimal value 168 = 128 + 32 + 8 = 10101000.

When to Use the IPv4 Binary Converter

  • Subnetting practice -- verify manual binary calculations when studying for CCNA, Network+, or CompTIA exams
  • Visualizing subnet boundaries -- compare an IP address and subnet mask in binary to see exactly where the network/host split occurs
  • Understanding non-standard prefix lengths -- see why a /27 mask gives 32 addresses by counting the host bits (11111111.11111111.11111111.11100000)
  • Debugging network issues -- confirm that two addresses are on the same subnet by comparing their network bits
  • Teaching IP fundamentals -- demonstrate how dotted decimal maps to 32-bit binary for junior engineers or students
  • Verifying ACL and firewall rules -- ensure wildcard masks and subnet masks are targeting the intended address range by viewing the bit pattern

How IPv4 Binary Addressing Works

Every IPv4 address is a 32-bit number. The dotted decimal notation we use daily is just a human-friendly way to read groups of 8 bits (octets). Under the hood, routers and network hardware work entirely with these binary values.

Network and Host Portions

When you pair an IP address with a subnet mask, the binary view reveals the division between network bits and host bits:

Address:  192.168.1.100  = 11000000.10101000.00000001.01100100
Mask:     255.255.255.0  = 11111111.11111111.11111111.00000000
                           |---- network bits ----|-- host --|
Network:  192.168.1.0    = 11000000.10101000.00000001.00000000

The mask's 1 bits identify the network portion. The mask's 0 bits identify the host portion. This is why binary representation is the fastest way to understand subnetting.

Non-Octet-Boundary Subnets

Binary conversion is especially valuable for prefix lengths that do not fall on octet boundaries. With a /27 prefix:

Address:  10.1.1.65      = 00001010.00000001.00000001.01000001
Mask:     255.255.255.224 = 11111111.11111111.11111111.11100000
Network:  10.1.1.64      = 00001010.00000001.00000001.01000000
Broadcast:10.1.1.95      = 00001010.00000001.00000001.01011111

In binary, you can see the last three bits of the third octet belong to the network, and only 5 bits remain for hosts, giving 2^5 - 2 = 30 usable addresses.

Wildcard Masks

Cisco ACLs use wildcard masks, which are the bitwise inverse of subnet masks. A subnet mask of 255.255.255.224 (11111111.11111111.11111111.11100000) has the wildcard mask 0.0.0.31 (00000000.00000000.00000000.00011111). Seeing both in binary makes the relationship obvious -- every 1 in the subnet mask becomes a 0 in the wildcard, and vice versa.

Practical Tips for Binary Conversion

The fastest way to build fluency with binary conversion is to memorize the powers of two for a single octet: 128, 64, 32, 16, 8, 4, 2, 1. Once you know these eight values, you can convert any decimal number from 0 to 255 by working left to right. Start with 128: does it fit? If yes, write 1 and subtract; if no, write 0 and move to 64. Repeat until you reach the ones place. With practice, you will recognize the most common octets instantly -- 255 is all ones, 192 is 11000000, 128 is 10000000, 224 is 11100000.

A common mistake when studying for certifications is to focus on memorizing subnet tables instead of understanding binary. Tables work for the standard prefix lengths, but when you encounter a real-world problem involving a /21 or a /27, the table tells you the answer without explaining why. If you understand binary, you can reconstruct any subnet table entry from first principles. You also catch mistakes more easily: if someone configures a /25 mask on one interface and a /24 on the other, a quick look at the binary shows exactly which bit differs and why devices on each side cannot communicate.

Another practical use is verifying wildcard masks in ACLs. It is easy to confuse a wildcard of 0.0.0.31 with 0.0.0.15 when working in decimal. In binary, 31 is 00011111 (five host bits) and 15 is 00001111 (four host bits). The bit count maps directly to the number of addresses matched, so the binary view is a quick sanity check before deploying an ACL change.

Frequently Asked Questions

Why do I need to convert IPv4 to binary?

Binary conversion is the foundation of subnetting. While you can memorize subnet tables, understanding binary lets you work with any prefix length, verify calculations, and troubleshoot network boundaries where addresses appear to be misconfigured. It is a required skill for networking certifications like CCNA and CompTIA Network+.

How many bits are in an IPv4 address?

Every IPv4 address is exactly 32 bits long, organized into four 8-bit octets. Each octet ranges from 00000000 (decimal 0) to 11111111 (decimal 255), which is why IPv4 addresses range from 0.0.0.0 to 255.255.255.255.

What is the difference between binary and dotted decimal notation?

They represent the same value. Dotted decimal (192.168.1.1) groups the 32 bits into four decimal numbers separated by dots for readability. Binary (11000000.10101000.00000001.00000001) shows every individual bit, which is necessary for understanding bit-level operations like subnet masking and AND calculations.

How do I quickly convert an octet from decimal to binary in my head?

Memorize the eight place values: 128, 64, 32, 16, 8, 4, 2, 1. Start from the left. If the decimal value is 200, it is greater than or equal to 128 so the first bit is 1 and you subtract to get 72. Then 72 >= 64, so the second bit is 1 leaving 8. Then 8 < 32, 8 < 16, 8 >= 8, so the bits are 0, 0, 1. The remaining bits are 0, 0, 0. Result: 11001000.

What is the binary representation of common subnet masks?

A /24 mask is 11111111.11111111.11111111.00000000 (255.255.255.0). A /16 mask is 11111111.11111111.00000000.00000000 (255.255.0.0). The pattern is straightforward: the prefix length tells you how many leading 1 bits appear, followed by all 0 bits. Non-octet boundary masks like /20 (11111111.11111111.11110000.00000000) split within an octet.

Can I use this tool for subnet mask conversion too?

Yes. Subnet masks are valid IPv4 addresses, so entering 255.255.255.224 produces 11111111.11111111.11111111.11100000. This immediately shows that it is a /27 mask with 27 network bits and 5 host bits.

Related Tools

IPparseβ€’Free Network & Subnet Calculator Tools

Β© 2026 IPparse. All tools run locally in your browser.

100% Privacy-First β€’ No Data Collected