CIDR blocks must start on binary boundaries and contain a power-of-two number of addresses. This calculator uses exact integer arithmetic for both 32-bit IPv4 and 128-bit IPv6. It never enumerates individual addresses, so even very large ranges are converted quickly without uploading your network plan.
IP Range to CIDR Converter
Runs entirely in your browser - no upload, no sign-up.
Enter two addresses from the same IP version. Both endpoints are included.
The shortest exact list of IPv4 or IPv6 CIDR blocks will appear here.
What does an IP range to CIDR converter do?
An IP range to CIDR converter turns inclusive start and end addresses into the smallest set of aligned CIDR blocks that covers the range exactly. It also expands IPv4 or IPv6 CIDR notation into its normalized first address, last address, and total address count, all inside your browser.
How to use
- 01Enter both endpoints
Type the inclusive start and end IPv4 or IPv6 addresses in the Range to CIDR mode.
- 02Review the minimal block list
The result updates with the fewest aligned CIDR blocks that cover every address and nothing outside the range.
- 03Copy the CIDRs
Copy the newline-separated list for a firewall, route table, cloud policy, or configuration file.
- 04Reverse the calculation
Switch to CIDR to range to normalize one prefix and see its exact first address, last address, and count.
Who it's for
- Security engineers converting provider IP spans into exact firewall, allowlist, and access-control entries.
- Cloud and DevOps teams preparing compact CIDR lists for security groups, Terraform, and routing policy.
- Network administrators checking whether a quoted start-to-end range aligns to one prefix or needs several blocks.
- Developers expanding IPv4 or IPv6 CIDRs while testing parsers, validators, and IP address management code.
FAQ
Are my IP addresses or network ranges uploaded?
No. IPv4 and IPv6 parsing, block alignment, and range conversion happen locally in your browser. This tool does not send your addresses to a calculation API or save the network plan you enter.
Is the IP range to CIDR converter free?
Yes. You can convert ranges and CIDR blocks without an account, payment, download, or calculation limit. The converter uses built-in browser arithmetic and does not depend on a paid network service.
What range sizes does the calculator support?
It supports the full IPv4 space from 0.0.0.0/0 and the full 128-bit IPv6 space from ::/0. Address counts use exact integer arithmetic, including the 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses in an IPv6 /0.
Does it support both IPv4 and IPv6?
Yes. Range mode accepts two addresses from the same version, and CIDR mode accepts prefixes from /0 to /32 for IPv4 or /0 to /128 for IPv6. Compressed IPv6 notation such as 2001:db8::1 is supported.
Why can one IP range produce several CIDR blocks?
One CIDR block must contain a power-of-two number of addresses and begin on a matching binary boundary. If the requested range starts off that boundary or has another length, several blocks are required to cover it exactly without including extra addresses.
Does the result include both range endpoints?
Yes. The start and end addresses are inclusive. A range with identical endpoints becomes one IPv4 /32 or IPv6 /128 block, and the address count is one.
How is this different from the IPv4 subnet calculator?
This converter starts with two endpoints and finds the smallest exact CIDR list, or expands one IPv4 or IPv6 CIDR. The IPv4 subnet calculator instead starts with a host and prefix or subnet mask, then reports broadcast, wildcard mask, and usable-host details.