Binary to IP Converter

Convert a 32-bit binary number into a dotted IPv4 address.

Result

About this tool

Binary to IP translates 32-bit binary strings into IPv4 dotted-decimal notation. Every IPv4 address is fundamentally a 32-bit number - binary notation makes that structure visible. This tool is used by networking students working through subnetting exercises, engineers reading raw packet captures, and developers debugging bitwise IP logic in custom scripts.

Real example

Input: 11000000101010000000000100000001

The tool splits this into four 8-bit groups:
11000000 = 192
10101000 = 168
00000001 = 1
00000001 = 1
Result: 192.168.1.1 - a standard private LAN gateway address.

You can also enter it with spaces between octets: 11000000 10101000 00000001 00000001 - non-binary characters are stripped before conversion.

Common use cases

  • Subnetting study: When learning CIDR, you work with subnet masks in binary. Converting back to dotted-decimal confirms your bit math is correct. Pair this with the CIDR / IP Converter to verify your subnet calculations end-to-end.
  • Wireshark and packet analysis: Some low-level protocol fields expose raw 32-bit IP values. Paste the binary string and get the readable address immediately.
  • Script output verification: Debugging a script that computes IP addresses via bitwise operations Paste the binary output here to confirm the result matches your intent.
  • Networking exams and labs: CCNA and similar certifications require binary-to-IP conversions. Use this to self-check your answers against expected results.

How it works

Any non-binary characters (spaces, dots, dashes) are stripped from the input first. The remaining string must be exactly 32 binary digits. These 32 bits are split into four 8-bit chunks, and each chunk is parsed as a base-2 integer using parseInt(octet, 2). The four resulting integers are joined with dots to produce standard IPv4 notation.

Common mistakes

  • Wrong bit count: IPv4 requires exactly 32 bits. 31 or 33 bits will always produce an error. A leading zero is often accidentally dropped by copy-paste or script truncation.
  • Confusing subnet masks with host addresses: A mask like 11111111111111111111111100000000 (255.255.255.0) is valid input - the tool converts it correctly. It represents a mask, not a host, but the binary math is identical.
  • Expecting octet-grouped output: This tool outputs the readable IP. If you need to go the other direction - see an IP's binary representation - use the IP to Binary tool instead.

FAQ

Can I paste binary with spaces between octets
Yes. The converter strips all non-binary characters before processing, so 11000000 10101000 00000001 00000001 and 11000000101010000000000100000001 produce the same result.

Does this handle IPv6
No. IPv6 addresses are 128 bits. Use the IPv6 to Binary tool for 128-bit conversions.

What does a subnet mask look like in binary
A /24 mask is 24 ones followed by 8 zeros: 11111111111111111111111100000000, which converts to 255.255.255.0. Paste any mask in binary here to get the dotted form.

Why does my binary string from another tool differ
Some tools separate octets with dots for readability. Strip the dots before pasting - the underlying value is the same.

Reading binary IP addresses

An IPv4 address in binary is 32 bits — four groups of eight. Each group of eight bits (an octet) maps directly to one decimal number between 0 and 255. Reading them left to right corresponds to the first through fourth decimal octets in dotted notation. For example: 11000000.10101000.00000001.00000001 is 192.168.1.1.

Binary notation makes certain network concepts immediately visible that dotted-decimal obscures. A subnet mask in binary is always a contiguous block of 1s followed by 0s — the 1s mark the network portion and the 0s mark the host portion. A /24 mask is exactly 11111111 11111111 11111111 00000000. A /20 mask is 11111111 11111111 11110000 00000000. Mismatches or non-contiguous masks (which are invalid in CIDR) are immediately obvious in binary but easy to miss in decimal.

Binary AND masking: how routing works

Routers determine which network an IP address belongs to by performing a bitwise AND of the IP address and the subnet mask. If the result equals the network address, the host is on that network. In binary this is straightforward: any bit position where the mask is 0 becomes 0 in the result, and bit positions where the mask is 1 retain the original address bit.

Example: Does 192.168.1.50 belong to the 192.168.1.0/24 network?

  • IP: 11000000 10101000 00000001 00110010
  • Mask: 11111111 11111111 11111111 00000000
  • AND: 11000000 10101000 00000001 00000000 = 192.168.1.0 ✓

This binary masking operation is exactly what your OS performs for every outbound packet to determine whether the destination is local or must be sent to the default gateway.

Common binary patterns

00000000 00000000 00000000 00000000 — 0.0.0.0. Default route or unspecified address depending on context.

01111111 00000000 00000000 00000001 — 127.0.0.1. Loopback address. Note the leading 0111 — all loopback addresses start with 0111 1111 (127.x.x.x).

11111111 11111111 11111111 11111111 — 255.255.255.255. Limited broadcast. All 32 bits set.

11000000 10101000 xxxxxxxx xxxxxxxx — 192.168.0.0/16. Any address starting with these 16 bits is in the RFC 1918 192.168 private range.

For IPv6 binary (128-bit), use the IPv6 to Binary converter. To convert the other direction, use Decimal to IP for integer-form addresses. For full subnet range calculations, see the CIDR IP Converter.

Related tools

  • IP to Binary — reverse — convert a dotted IPv4 address back to 32-bit binary
  • Decimal to IP — convert 32-bit decimal integers to dotted notation
  • Hex to IP — convert 8-character hex values to IPv4 addresses
  • CIDR / IP Converter — calculate subnet host ranges from the address you just converted