IP to Binary Converter

Convert any IPv4 address to binary, hexadecimal, and decimal formats instantly. Useful for network engineers, students, and anyone learning about IP addressing.

What Is Binary and Why Does It Matter for IP Addresses?

Binary is a base-2 number system that uses only two digits: 0 and 1. Every computer, router, and network device processes data in binary. When you type an IP address like 192.168.1.1, your device internally represents it as a 32-bit binary number.

Understanding binary representation of IP addresses is essential for network subnetting, access control list (ACL) configuration, and troubleshooting routing issues. Network engineers regularly convert IP addresses between decimal, binary, and hexadecimal to work with subnet masks and wildcard masks.

How IPv4 Addresses Are Structured

An IPv4 address consists of four octets, each ranging from 0 to 255. Each octet is 8 bits, making the total address 32 bits long. The address is divided into a network portion and a host portion, determined by the subnet mask.

IP Address Classes

ClassFirst Octet RangeDefault MaskBinary StartPurpose
A1 - 126255.0.0.00xxxxxxxLarge networks
B128 - 191255.255.0.010xxxxxxMedium networks
C192 - 223255.255.255.0110xxxxxSmall networks
D224 - 239N/A1110xxxxMulticast
E240 - 255N/A1111xxxxReserved

Common Binary Conversion Reference

DecimalBinaryHexUsage
00000000000Network address (host part)
10000000101First usable host
1281000000080/25 boundary
19211000000C0/26 boundary
22411100000E0/27 boundary
24011110000F0/28 boundary
24811111000F8/29 boundary
25211111100FC/30 boundary
25411111110FELast usable host
25511111111FFBroadcast (host part)

How to Convert an IP Address to Binary Manually

To convert an IP address to binary by hand, take each octet and divide it repeatedly by 2, recording the remainder. Read the remainders from bottom to top to get the binary representation. Pad with leading zeros to ensure each octet is exactly 8 bits.

Step-by-Step Example: Converting 192 to Binary

  1. 192 / 2 = 96 remainder 0
  2. 96 / 2 = 48 remainder 0
  3. 48 / 2 = 24 remainder 0
  4. 24 / 2 = 12 remainder 0
  5. 12 / 2 = 6 remainder 0
  6. 6 / 2 = 3 remainder 0
  7. 3 / 2 = 1 remainder 1
  8. 1 / 2 = 0 remainder 1

Reading the remainders bottom-to-top gives 11000000, which is the binary representation of 192.

Use Cases for IP to Binary Conversion

  • Subnetting: Determine the network and host portions of an address by examining binary boundaries. Use our Subnet Calculator for automated results.
  • Access Control Lists: Wildcard masks in Cisco ACLs are calculated in binary to match ranges of IP addresses.
  • Routing Tables: Routers compare destination IPs with route entries in binary using longest prefix match.
  • Network Troubleshooting: Understanding binary helps diagnose mismatched subnets and incorrect gateway configurations.
  • DHCP Scopes: Setting proper IP ranges requires knowing subnet boundaries in binary.

Private vs Public IP Addresses

Some IP address ranges are reserved for private use and are not routable on the public internet. Knowing these ranges and their binary representations helps with network design.

RangeCIDRBinary StartNumber of Addresses
10.0.0.0 - 10.255.255.25510.0.0.0/800001010.xxxxxxxx16,777,216
172.16.0.0 - 172.31.255.255172.16.0.0/1210101100.0001xxxx1,048,576
192.168.0.0 - 192.168.255.255192.168.0.0/1611000000.1010100065,536

To find your current IP address, check out our What Is My IP tool.

Video Tutorial

Related Tools and Guides

Frequently Asked Questions

How do I convert an IP address to binary?

Split the IP into four octets, then convert each octet from decimal to an 8-bit binary number. For example, 192.168.1.1 becomes 11000000.10101000.00000001.00000001. You can use the converter tool above or do it manually by dividing each number by 2 and tracking remainders.

Why are IP addresses 32 bits long?

IPv4 addresses use 32 bits, providing approximately 4.3 billion unique addresses. This was considered sufficient when the protocol was designed in the 1980s. IPv6 uses 128 bits to address the shortage of available IPv4 addresses.

What is the difference between binary and hexadecimal?

Binary is base-2 (digits 0-1) while hexadecimal is base-16 (digits 0-9 and A-F). Hexadecimal is a more compact way to represent binary values, with each hex digit corresponding to exactly 4 binary bits. Network engineers use hex for MAC addresses and IPv6 addresses.

Can I convert IPv6 addresses to binary?

Yes, but IPv6 addresses are 128 bits long, making them much longer in binary. IPv6 addresses are typically represented in hexadecimal with colon separators (e.g., 2001:0db8::1). This tool focuses on IPv4 conversion.

About Tommy N.

Tommy is the founder of RouterHax and a network engineer with 10+ years of experience in home and enterprise networking. He specializes in router configuration, WiFi optimization, and network security. When not writing guides, he's testing the latest mesh WiFi systems and helping readers troubleshoot their home networks.

Promotion for FREE Gifts. Moreover, Free Items here. Disable Ad Blocker to get them all.

Once done, hit any button as below