IP Range to CIDR

Find the minimal CIDR blocks that exactly cover an IP range.

Given a start and end IP address, this tool computes the smallest set of CIDR blocks that covers exactly that range with no gaps and no overlap. This is the inverse of CIDR expansion.

Finds the minimal set of CIDR blocks covering exactly the range.

Related tools

Frequently asked questions

Why might a range need multiple CIDRs?

A range may not align to power-of-two boundaries. The algorithm finds the minimal aligned set of blocks that covers it exactly.