IPv4 Subnet Calculator
Network, broadcast, host range, and masks for any IPv4 block.
Convert CIDR to an IP range: enter a block like 10.0.0.0/30 to get its first and last address. It also works the other way, turning any start and end address into the fewest CIDR blocks.
IPv4 like 192.168.0.0/22 or IPv6 like 2001:db8::/120.
192.168.0.0/22. Tick List every address if you need them one per line.CIDR to range. For a block a/p, the first address is a with its last (bits − p) bits cleared, and the last address is the same with those bits set. The block holds 2^(bits − p) addresses, where bits is 32 for IPv4 and 128 for IPv6.
Range to CIDR. Starting at the first address, the converter takes the largest block that both starts on a boundary of its own size and ends at or before the last address. It repeats from the next address until the range is covered. This greedy method always gives the shortest possible list.
10.0.0.0/30 = 10.0.0.0 to 10.0.0.3 (4 addresses).10.0.0.0 to 10.0.0.5 = 10.0.0.0/30 and 10.0.0.4/31.192.168.0.0/22 = 192.168.0.0 to 192.168.3.255 (1,024 addresses).192.168.1.10 to 192.168.1.20 needs four blocks: /31, /30, /30, and /32.2001:db8::/120 = 2001:db8:: to 2001:db8::ff (256 addresses).10.0.0.5/30, the range of the block that contains it is shown, with a note.The first 24 bits are the network part, so the block covers 192.168.1.0 to 192.168.1.255: 256 addresses.
Split the range into blocks whose size is a power of 2 and whose start is a multiple of that size. The Range to CIDR tab does this and returns the fewest blocks possible.
A CIDR block always has a power-of-2 size and starts on a matching boundary. A range like 10.0.0.0 to 10.0.0.5 (6 addresses) can only be covered by a block of 4 plus a block of 2.
Often used together with the CIDR to IP Range.
Network, broadcast, host range, and masks for any IPv4 block.
First and last address, size, and type of any IPv6 prefix.
Pulls every valid IPv4 and IPv6 address out of any text.