Why convert ranges to CIDR?
Firewalls, routers and cloud security groups usually accept subnets, not arbitrary ranges. To allow 192.168.1.10 – 192.168.1.75 you need the exact set of aligned blocks that covers those addresses and nothing else — here that is 192.168.1.10/31, /30, /28, /27, /29, /30. Doing it by hand is slow and error-prone.
How the algorithm works
Starting from the first address, the converter picks the largest block that is both aligned on its own size and does not overshoot the end of the range, emits it, and moves to the next address. The result is always the minimal list of CIDRs.
Accepted formats
10.0.0.0/22or10.0.0.0/255.255.252.010.0.0.5-10.0.0.9,10.0.0.5 - 10.0.0.9,10.0.0.5 10.0.0.9- A single address is treated as a /32