Convert an IPv4 address to its 32 bits and back, or see the 128 bits of an IPv6 address. Click any IPv4 bit to toggle it, or give an IPv6 prefix to see its network and host parts.
Every IPv4 address is a 32-bit number, written as four groups of 8 bits (octets) separated by dots. Each octet represents a value from 0 to 255. Converting an IP address to binary shows exactly how routers interpret the address at the bit level - which bits form the network prefix and which identify the host.
This tool lets you convert any IPv4 address to its binary representation and edit it bit by bit. Toggling a bit immediately updates the decimal octet and the full IP address. This makes it easy to understand subnet masks, wildcard masks, and CIDR boundaries. An IPv6 address, full or shortened, shows its 128 bits in eight groups of 16, its hexadecimal groups, and the network and host parts for a given prefix (/64 when none is given).
192.168.1.1 in binary is 11000000.10101000.00000001.00000001 - each group of 8 bits is one octet. The subnet mask 255.255.255.0 is 11111111.11111111.11111111.00000000, where the 24 ones indicate the network bits and the 8 zeros indicate the host bits.