IP Range to CIDR Converter
Convert any IPv4 range, such as 10.0.0.5 to 10.0.1.130, into the smallest list of CIDR blocks that covers it exactly.
Free · No sign-up · Your inputs stay in your browser
Input
Convert an IP range to CIDR blocks
Output
CIDR blocks
382 addresses in 10 blocks
The fewest blocks that cover exactly the range: each step takes the largest block that starts on its own boundary and stays inside the range. Firewalls, security groups and allow lists take CIDR blocks rather than ranges, and a range that does not start on a boundary always needs several.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Why ranges become several blocks
A CIDR block always starts at a multiple of its own size, so 10.0.0.5 to 10.0.1.130 cannot be one block: it becomes a /32, a /30, /29, /28, /27, /25 and so on. Firewalls, cloud security groups, Nginx allow lists and most ACLs accept CIDR rather than ranges, and the count matters because security groups limit rules.
Address blocks you are given as ranges
Registry allocations, DHCP pools and some providers' published address lists are written as start and end addresses. Converting them once avoids hand-calculating boundaries. The notation itself is defined in RFC 4632.