What range-to-CIDR conversion does
This tool performs the inverse of a CIDR range calculator. Instead of starting with a prefix, you provide the first and last IPv4 address in an interval. The converter returns the minimum exact set of CIDR prefixes that covers every address in that interval and no address outside it.
A perfectly aligned range such as 192.168.10.0 through 192.168.10.255 becomes one 192.168.10.0/24. An irregular range usually requires several prefixes. Use the CIDR range calculator for the reverse operation.
Why one range may need multiple CIDR blocks
CIDR blocks have sizes that are powers of two and must begin on boundaries aligned to those sizes. A range can therefore be continuous without matching one legal CIDR block. The converter starts at the first address, chooses the largest aligned block that does not pass the requested end, and repeats until the complete interval is covered.
This greedy decomposition produces an exact and minimal prefix set under CIDR rules. It is especially useful when converting legacy allowlists, firewall objects, provider ranges or inventory exports into prefix-based configuration.
Example with an irregular IPv4 interval
Consider an interval from 192.168.10.10 to 192.168.10.25. The start is not aligned to a single block that also ends exactly at .25, so the range must be divided into several prefixes. Small blocks cover the unaligned beginning and end, while larger blocks are used wherever alignment permits.
The result can look more complex than one broad covering prefix, but it has an important property: no outside addresses are added. That distinction matters in ACLs and firewall rules where unintentionally including neighboring hosts can broaden access.
Exact coverage versus a broader summary
An exact decomposition is different from route summarization. A routing design may deliberately advertise a broader prefix that covers unused or separately routed space, provided the topology and policy support that choice. This converter does not make that policy decision; it represents the requested interval exactly.
If you already have several CIDR networks and want to reduce them without adding new address space, use the CIDR aggregator. The supernetting guide explains the design considerations around summaries.
Using the result in ACLs and firewall objects
Many security systems accept CIDR prefixes rather than arbitrary start/end ranges. Converting the interval into exact prefixes lets you preserve the original scope while expressing it in a format suitable for network policy. Always verify whether the target platform has limits on the number of entries or uses wildcard masks instead of CIDR notation.
For Cisco-style wildcard calculations, the wildcard mask converter can translate a prefix into the inverse mask commonly used by ACL syntax.
Validation and input boundaries
Both addresses must be valid IPv4 values and the starting address must not be greater than the ending address. The resulting prefixes are ordered from the beginning of the range to the end. Their combined address count should equal the size of the original interval exactly.
If the range itself is based on planned subnets, consider checking those networks with the subnet overlap checker before turning the output into production policy.
Frequently asked questions
Will the converter include addresses outside my start and end values?
No. The result is an exact cover of the requested interval.
Why does an irregular range produce many prefixes?
CIDR requires power-of-two block sizes and binary alignment. Unaligned edges must be represented by smaller blocks.
Is the result always the smallest possible exact set?
Yes. The algorithm repeatedly selects the largest valid aligned block that fits inside the remaining interval.
Can I use the tool for IPv6?
This converter is for IPv4. IPv6 subnet planning is provided by separate tools.
Next step
After generating the prefixes, validate them against the intended network policy and document why the original range exists. Exact conversion prevents accidental expansion, but operational correctness still depends on where the prefixes are used.