IP Address to Binary Converter

Convert an IPv4 address to binary, each octet shown as eight bits.

IP addresses
Binary
Runs locally in your browser

About the IP Address to Binary Converter

Seeing an IP address in binary is the key to understanding subnetting: the network and host parts of an address are split at a bit boundary, which the dotted-decimal form hides. This tool converts each octet to eight bits and joins them with dots, so 192.168.1.1 becomes 11000000.10101000.00000001.00000001. Convert several at once, one per line.

It pairs naturally with the CIDR Calculator, which shows the mask and network in binary too. To reverse, use Binary to IP.

Every octet is padded to a full eight bits even when the value is small, because the padding is what makes the columns line up. Write a mask underneath and the boundary becomes obvious: a /26 mask is 11111111.11111111.11111111.11000000, so the first 26 bits are network and the six that remain give 64 addresses in the block. Prefix lengths that are not multiples of eight are precisely where dotted decimal stops helping and this view starts.

A /31 is the case that breaks the usual arithmetic. It leaves a single host bit, so the familiar rule of subtracting a network and a broadcast address would leave nothing usable, yet RFC 3021 defines a /31 as a two-address point-to-point link and routers use them on WAN links every day. Reading the bits directly is how that stops being a special case you have to memorise.

How to use

  1. Paste IPv4 addresses, one per line.
  2. Copy the binary octets.
  3. Compare with a subnet mask to see the split.

Common questions

Why show each octet as eight bits?
So the 32 bits line up with a subnet mask, making the network and host boundary visible.
Are the dots kept?
Yes, each 8-bit octet is separated by a dot for readability.
IPv6?
Not here; this is IPv4. Use the IPv6 tools for those addresses.