IP Range to CIDR
Convert an arbitrary inclusive IPv4 range into a minimal exact CIDR list.
Cover an IPv4 interval with exact CIDR blocks
CIDR blocks must begin on boundaries aligned to a power-of-two size, so an arbitrary start and end cannot always be represented by one prefix. This converter validates both IPv4 addresses, treats the range as inclusive, and repeatedly selects the largest aligned block that does not extend beyond the final address. The result is an exact minimal cover with no addresses added outside the range.
The default range from 192.168.1.5 through 192.168.1.14 becomes five blocks: the endpoints as /32 entries, aligned /31 pairs at 6 and 12, and a /30 block beginning at 8. A reversed range is rejected instead of being silently swapped, preserving the meaning of start and end.
Alignment determines the minimal decomposition
Minimal CIDR count depends on both interval length and binary alignment. Firewall and routing systems may also impose limits, ordering rules, or support for native start-end ranges. The decomposition runs only in your browser and performs no route lookup. Review whether the inclusive endpoints are correct and whether any resulting public address ranges should be authorized before applying rules.
Frequently Asked Questions
Does the CIDR list include both entered endpoints?
Yes. The start and end addresses are treated as an inclusive range.
Why can a short range require several CIDR blocks?
Each block must have a power-of-two size and start on the matching binary boundary.
Will the result include addresses outside the range?
No. Every selected block is bounded by the exact start and end values.
Browse the full set of free, private, in-browser tools.