CIDR block to IP range
A CIDR block always starts at a boundary that fits its size. The first address is the address you typed with all the host bits set to 0, and the last address has all the host bits set to 1.
192.168.10.0/22
First 192.168.8.0
Last 192.168.11.255
Notice that the block starts at 192.168.8.0, not at 192.168.10.0. A /22 holds four networks of 256 addresses, so it must start on a multiple of four in the third number, and 10 falls in the group 8 to 11. The tool shows the real start.
IP range to CIDR blocks
Some systems, such as firewalls, cloud security groups and allow lists, accept only CIDR blocks and not ranges. The second tool converts a start and end address into the shortest list of blocks that covers exactly that range and nothing more.
10.0.0.0 to 10.0.0.255 gives 10.0.0.0/24
192.168.1.10 to 192.168.3.200 gives 11 blocks
Why a range may need several blocks
A CIDR block must hold a power of two addresses and start on a multiple of its own size. A range that does not line up that way cannot be one block. The tool starts at the first address, takes the largest block that is aligned there and still fits inside the range, and repeats until it reaches the end.
Using the results
- The first and last addresses are the whole block. The usable range leaves out the network and broadcast addresses.
- Both addresses in a range must be the same version, both IPv4 or both IPv6.
- A very wide range can produce many blocks, so the list shows the first 1000.
For all the other details of a block, use the CIDR calculator. To work out a mask, see CIDR to subnet mask.