Free browser tool

IP range to CIDR converter

Enter the first and last IP address to get the smallest CIDR list that covers exactly that range.

Convert start and end IPs to CIDR

192.168.1.5 through .20 cannot fit in one exact CIDR

CIDR blocks have power-of-two sizes and alignment boundaries. An arbitrary start/end range often needs several blocks to cover it without spillover.

192.168.1.5 – 192.168.1.20 becomes the smallest exact CIDR list that contains no extra addresses.

An enclosing subnet and an exact cover are different

One larger subnet may include addresses outside your requested span. This tool decomposes the span instead, which is useful for ACLs, firewall rules, and allowlists.