Home / Network tools / CIDR to IP range

CIDR to IP Range Converter

Enter a CIDR block and get its first and last IP address. Or enter two addresses and get the shortest list of CIDR blocks that covers them.

Details

IP range to CIDR

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.

Frequently asked questions

How do I find the first and last IP of a CIDR block?

Set all the host bits to 0 for the first address and to 1 for the last. The tool does this when you enter the block.

What is the IP range of 192.168.0.0/16?

192.168.0.0 to 192.168.255.255, which is 65,536 addresses.

How do I convert an IP range to CIDR?

Enter the start and end address in the Range to CIDR box. You get the shortest list of blocks that covers the range.

Why do I get more than one CIDR block?

A single block must be a power of two in size and start on a multiple of that size. Other ranges need several blocks.