IP to Binary Converter

Convert an IPv4 address to binary and back, octet by octet.

How to Use

  1. Enter an address or binary value — Type a dotted IPv4 address such as 192.168.1.1, or paste a 32-bit binary string. Click Load Example for a sample.
  2. Convert — Click Convert to expand each octet into its 8-bit binary form, or to turn a binary value back into a dotted address.
  3. Compare the representations — The output lists binary, dotted-decimal, hexadecimal, and 32-bit integer forms side by side. Conversion also runs as you type.
  4. Copy the result — Use the copy button to grab the representation you need for a subnet, script, or configuration file.

All conversion happens in your browser. Your addresses are never uploaded to a server.

What is IP to binary conversion?

An IPv4 address is made of four octets, each a number from 0 to 255. Converting an address to binary expands every octet into its 8-bit form, which is useful for understanding subnets, netmasks, and bitwise operations. Because each octet is exactly 8 bits, an IPv4 address is always 32 bits wide.

This converter shows the binary form alongside decimal, hexadecimal, and the single 32-bit integer representation of the address. Seeing all of these at once makes it far easier to reason about masks and ranges than reading a dotted address on its own.

The tool works in both directions. Enter a dotted address to get binary, or paste a 32-bit binary value (spaces, dots, and other separators are ignored) to get the dotted-decimal, binary, and hexadecimal forms back.

Reading the Octets

Each of the four octets is weighted by its position in the 32-bit number. Adding the weights of the bits set to 1 gives the value of the octet.

Bit 128 64 32 16 8 4 2 1
192 11000000
168 10101000
1 00000001

Example: 192 = 128 + 64, which is 11000000 in binary.

Conversion Examples

IPv4 Binary (dotted) Hex Integer
192.168.1.111000000.10101000.00000001.00000001c0.a8.01.013232235777
10.0.0.100001010.00000000.00000000.000000010a.00.00.01167772161
127.0.0.101111111.00000000.00000000.000000017f.00.00.012130706433
8.8.8.800001000.00001000.00001000.0000100008.08.08.08134744072

Common Uses and Pitfalls

  • Subnetting — Seeing the binary form makes it obvious where the network and host bits split when you apply a subnet mask.
  • Access-control rules — Firewalls and CDNs often express rules as CIDR ranges; binary helps you confirm that two addresses share a prefix.
  • Debugging bitwise code — The 32-bit integer form is exactly what languages use when an address is treated as an unsigned int.
  • Each octet must be 0-255 — a value such as 192.168.1.300 is rejected, because an 8-bit octet cannot hold more than 255.
  • This tool is IPv4 only — IPv6 addresses are 128 bits wide and use a different notation, so they are not handled here.

Frequently Asked Questions

Why is each octet 8 bits?

An IPv4 address is 32 bits wide. Split into four equal parts, each part is 8 bits, which can represent values from 0 to 255. That is why every octet is padded to eight digits in binary.

Can I convert binary back to an IP?

Yes. Paste a 32-bit binary value and the converter groups it into octets and produces the dotted-decimal, binary, and hexadecimal forms. Separators such as spaces and dots are ignored, and the value is left-padded to 32 bits.

Does this support IPv6?

This tool focuses on IPv4. IPv6 addresses are 128 bits wide and use a different notation, so they are not handled here.

What is the integer form of an IP address?

The 32-bit integer form is the address read as a single unsigned number, calculated as (octet1 × 2^24) + (octet2 × 2^16) + (octet3 × 2^8) + octet4. For 192.168.1.1 that equals 3232235777.

Is my IP address sent to a server?

No. The conversion is performed entirely in your browser with JavaScript, so the addresses you enter never leave your device.

Why do leading zeros matter?

Binary is positional. 5 as an 8-bit octet is 00000101 rather than 101, and dropping the leading zeros would change where the bits line up when you compare addresses or apply a mask.