User Rating 0.0
Total Usage 0 times
Dotted, continuous (32-bit), or space-separated. Optional /CIDR suffix.
Standard dotted-decimal IPv4. Optional /CIDR suffix.
Examples:
Examples:
Result
Is this tool helpful?

Your feedback helps us improve.

About

Every IPv4 address is a 32-bit unsigned integer split into four 8-bit octets. Misreading a single bit in a subnet mask or ACL rule can route traffic to the wrong network segment or expose hosts to unauthorized access. This tool converts raw binary notation - dotted (11000000.10101000.00000001.00000001), continuous (11000000101010000000000100000001), or space-separated - into standard dotted-decimal IPv4 format. It validates that each octet falls within the range 00000000 to 11111111 (decimal 0 - 255) and flags malformed input before you paste it into a firewall rule.

The converter also operates in reverse: enter a decimal IP and retrieve its binary representation. CIDR prefix lengths (/24, /16) are preserved through conversion. Note: this tool handles IPv4 only. IPv6 uses 128-bit addresses with hexadecimal notation, which requires a different parsing strategy.

binary to ip ip address converter binary converter ipv4 networking binary to decimal ip calculator

Formulas

An IPv4 address is a 32-bit value partitioned into 4 octets. Each octet is an 8-bit binary number converted to its decimal equivalent independently.

D = 7i=0 bi 2i

Where D is the decimal value of one octet, bi is the bit at position i (counting from the right, starting at 0), and the sum runs over all 8 bit positions.

The full IPv4 address is reconstructed by joining four such decimal values with dots:

IP = D1 . D2 . D3 . D4

For the reverse (decimal to binary), each octet D is converted via successive division by 2, collecting remainders right-to-left, then zero-padded to 8 digits:

bi = D mod 2i+12i

Where D [0, 255] and the result is a string of exactly 8 characters from the set {0, 1}.

Reference Data

CIDR PrefixSubnet Mask (Decimal)Subnet Mask (Binary)Usable HostsNetwork Class
/32255.255.255.25511111111.11111111.11111111.111111111Host
/31255.255.255.25411111111.11111111.11111111.111111102Point-to-point
/30255.255.255.25211111111.11111111.11111111.111111002Point-to-point
/28255.255.255.24011111111.11111111.11111111.1111000014Small LAN
/24255.255.255.011111111.11111111.11111111.00000000254Class C
/22255.255.252.011111111.11111111.11111100.000000001022Supernet
/20255.255.240.011111111.11111111.11110000.000000004094Supernet
/16255.255.0.011111111.11111111.00000000.0000000065,534Class B
/12255.240.0.011111111.11110000.00000000.000000001,048,574Large ISP
/8255.0.0.011111111.00000000.00000000.0000000016,777,214Class A
/4240.0.0.011110000.00000000.00000000.00000000268,435,454Reserved
/00.0.0.000000000.00000000.00000000.000000004,294,967,294Default route
Common Private Ranges
/810.0.0.000001010.00000000.00000000.0000000016,777,214Class A Private
/12172.16.0.010101100.00010000.00000000.000000001,048,574Class B Private
/16192.168.0.011000000.10101000.00000000.0000000065,534Class C Private
/4224.0.0.011100000.00000000.00000000.00000000 - Multicast (Class D)
/32127.0.0.101111111.00000000.00000000.000000011Loopback
/16169.254.0.010101001.11111110.00000000.0000000065,534Link-local (APIPA)

Frequently Asked Questions

Three formats are supported: dotted binary (e.g., 11000000.10101000.00000001.00000001), continuous 32-bit binary (e.g., 11000000101010000000000100000001), and space-separated octets (e.g., 11000000 10101000 00000001 00000001). The tool auto-detects the format. CIDR prefix notation is also preserved - append /24 to any format and it carries through to the result.
Each octet must be exactly 8 binary digits (0 or 1). Common errors include octets with fewer than 8 bits (e.g., 1100000 instead of 01100000), non-binary characters (2, 3, etc.), or providing fewer or more than 4 octets. A continuous input must be exactly 32 bits long. The tool highlights which specific octet fails validation.
The CIDR prefix (e.g., /24) indicates how many leading bits define the network portion. It does not change the binary-to-decimal conversion itself - it is passed through as metadata. A /24 prefix means the first 24 bits (3 octets) are the network address and the remaining 8 bits identify hosts, yielding 2^8 − 2 = 254 usable host addresses.
Yes. A subnet mask is simply another 32-bit IPv4 value. Enter 11111111.11111111.11111111.00000000 and you get 255.255.255.0. Valid subnet masks in binary must consist of contiguous 1-bits followed by contiguous 0-bits. The tool will convert any valid 32-bit binary input regardless of whether it represents a host address or a mask.
An 8-bit binary octet can represent values from 00000000 (decimal 0) to 11111111 (decimal 255). This is because 2^8 − 1 = 255. Any IPv4 octet outside this range is invalid per RFC 791.
No. IPv6 addresses are 128 bits long and use hexadecimal notation with colon separators (e.g., 2001:0db8::1). This tool is strictly IPv4, which uses 32-bit addresses. IPv6 conversion requires different parsing logic for hex groups, zero-compression (::), and mixed notation.