Binary To IP
Ready to try Binary To IP?
Access the free online tool now - no registration required
Binary To IP - Complete Guide
Binary to IP converter transforms 32-bit binary strings into dotted-decimal IPv4 addresses. Each IP address octet (0-255) is represented by 8 binary bits. Essential for understanding networking, subnet masks, and low-level IP operations.
How It Works
Take 32 binary digits, split into four 8-bit groups (octets), convert each octet from binary to decimal (0-255), and join with dots. Example: 11000000.10101000.00000001.00000001 = 192.168.1.1.
Technical Details
IPv4 addresses are 32 bits total. Each octet is 8 bits (0-255 decimal). Network byte order is big-endian (most significant octet first). Input can include dots for readability or be continuous 32 bits.
Common Use Cases
- Network Debugging: Convert binary packet dumps to readable addresses.
- Subnet Mask Understanding: Visualize how /24 = 11111111.11111111.11111111.00000000 = 255.255.255.0
- Access Control Lists: Binary representation clarifies wildcard masks.
- Education: Learn how IP addresses map to binary representation.
Code Examples
Binary to IP Conversion
function binaryToIP(binary) {
// Remove dots and spaces, validate
const clean = binary.replace(/[.\s]/g, '');
if (!/^[01]{32}$/.test(clean)) {
throw new Error('Invalid: need exactly 32 binary digits');
}
// Split into octets and convert
const octets = [];
for (let i = 0; i < 32; i += 8) {
octets.push(parseInt(clean.slice(i, i + 8), 2));
}
return octets.join('.');
}
// Examples
binaryToIP('11000000101010000000000100000001');
// "192.168.1.1"
binaryToIP('11000000.10101000.00000001.00000001');
// "192.168.1.1"
// CIDR to subnet mask
function cidrToMask(cidr) {
const binary = '1'.repeat(cidr) + '0'.repeat(32 - cidr);
return binaryToIP(binary);
}
cidrToMask(24); // "255.255.255.0"
Split 32 bits into 4 octets, convert each to decimal (0-255), join with dots.
Tips & Best Practices
- 32 bits total, 8 bits per octet
- Each octet is 0-255 in decimal
- Leading zeros in binary matter
- CIDR /n means n network bits
- AND with mask gives network address
Common Mistakes to Avoid
- Wrong number of bits (not 32)
- Forgetting leading zeros
- Confusing network/host byte order
- Not validating binary input
When to Use This Tool
Use binary to IP converter when working with raw network data, learning subnetting, debugging packet captures, or understanding binary IP representation.
Frequently Asked Questions
What is CIDR notation?
/24 means 24 bits for network, 8 for hosts. In binary: 24 ones followed by 8 zeros = 11111111.11111111.11111111.00000000 = 255.255.255.0. /16 = 255.255.0.0, /8 = 255.0.0.0.
How do I find network address from binary?
AND the IP and mask in binary. Network bits (1s in mask) are preserved, host bits (0s in mask) become 0. This gives the network address that identifies the subnet.
What about IPv6?
IPv6 is 128 bits, represented as eight 16-bit groups in hexadecimal. Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334. Binary to IPv6 requires different handling (hex, not decimal).
Why is each octet 8 bits?
Historical design choice. 8 bits = 1 byte = values 0-255. Four octets = 32 bits total, giving ~4.3 billion unique addresses (not enough, hence IPv6). Dotted decimal is more readable than 32-bit numbers.
Get Started
Ready to try Binary To IP? Use the tool now - it's free, fast, and works right in your browser.
Last updated: June 27, 2026
Start using Binary To IP
Free, fast, and privacy-focused - try it now
Share this article
Related Tools
BBCODE To HTML
Convert bbcode to html online. Fast, accurate conversion with support for multiple formats. Perfect for data transformation, migration, and integration tasks.
CSV To JSON
Convert csv to json online. Fast, accurate conversion with support for multiple formats. Perfect for data transformation, migration, and integration tasks.
CSV Validator
Convert csv validator online. Fast, accurate conversion with support for multiple formats. Perfect for data transformation, migration, and integration tasks.
Curl To Php
Convert curl to php online. Fast, accurate conversion with support for multiple formats. Perfect for data transformation, migration, and integration tasks.