Install
4Internet / ip subnet
Range to CIDR
Convert an inclusive IPv4 or IPv6 address range to its minimal aligned CIDR cover.
Local · inclusive range · minimal cover
Convert a range
A practical guide
How to use Range to CIDR
Turn an inclusive address interval into the smallest set of aligned CIDR blocks that covers exactly that interval. This is useful when a supplied start/end range must be expressed as network prefixes.
- Enter the first address and the last address in the two fields. Both endpoints are included and must use the same IP version.
- Convert the range and read the CIDR count. An interval that is not aligned to one block will produce several prefixes.
- Copy every returned CIDR when you need the complete cover. Check a particular address with IP Range Matcher before using the list elsewhere.
Worked example
Illustrative input and expected interpretation. This example is not a live measurement.
Input
Start: 192.0.2.1 End: 192.0.2.6
What to expect
CIDR count: 4 192.0.2.1/32 192.0.2.2/31 192.0.2.4/31 192.0.2.6/32
What to watch for
- Replacing the returned list with a larger enclosing subnet can include addresses outside the requested interval.
- A descending interval or mixed IPv4/IPv6 endpoints is rejected. The tool calculates addresses and does not install a firewall or routing rule.
Your input: submitted to this server for processing. This tool does not send it to an AI provider. Your input is processed for this request. Temporary processing files are removed afterward. Avoid pasting secrets or personal data.