Convert IP ranges to CIDR and merge networks
Paste ranges, single IPs or CIDR blocks, one per line, and get the shortest list of CIDR blocks that covers exactly the same addresses.
4 entries → 6 CIDR blocks · 1 040 IPv4 addresses
| CIDR block | First IP | Last IP | Addresses |
|---|---|---|---|
| 10.0.0.5/32 | 10.0.0.5 | 10.0.0.5 | 1 |
| 10.0.0.6/31 | 10.0.0.6 | 10.0.0.7 | 2 |
| 10.0.0.8/29 | 10.0.0.8 | 10.0.0.15 | 8 |
| 10.0.0.16/30 | 10.0.0.16 | 10.0.0.19 | 4 |
| 10.0.0.20/32 | 10.0.0.20 | 10.0.0.20 | 1 |
| 192.168.0.0/22 | 192.168.0.0 | 192.168.3.255 | 1 024 |
Supernet that contains everything (summary route): 0.0.0.0/0
How to convert a range to CIDR
Paste your ranges, IPs or networks, one per line. Write ranges with a hyphen: 10.0.0.5 - 10.0.0.20.
Click «Calculate»: adjacent networks are merged, duplicates removed and every range split into exact CIDR blocks.
Copy the resulting list into your firewall, router or access list, and check the supernet if you want a single summary route.
Why a range is not always a single CIDR block
A CIDR block always has a power-of-two size (1, 2, 4, 8… addresses) and starts at an address that is a multiple of that size. An arbitrary range such as 10.0.0.5 - 10.0.0.20 meets neither condition, so it has to be split into several blocks:
- 10.0.0.5/32 (one address)
- 10.0.0.6/31 (two addresses)
- 10.0.0.8/29 (eight addresses)
- 10.0.0.16/30 (four addresses)
- 10.0.0.20/32 (one address)
The tool always works out the shortest possible list, which is what you want in a firewall or an access list: fewer rules are easier to maintain and faster to evaluate.
Aggregating networks: merging adjacent blocks
Aggregating (or summarizing) means merging several networks into larger ones without changing the addresses they cover. Two blocks of the same size can be merged if they are adjacent and the first one is aligned to the doubled size. For example, 192.168.0.0/24 and 192.168.1.0/24 make 192.168.0.0/23; add 192.168.2.0/23 and the whole set becomes 192.168.0.0/22.
However, 192.168.1.0/24 and 192.168.2.0/24 cannot be merged into a /23, because that /23 would have to start at 192.168.0.0 or 192.168.2.0. The tool applies these rules for you and also removes networks that are duplicated or contained in others.
Supernets and route summarization
The supernet is the smallest block that contains all your networks. It is what you use to advertise one route instead of many (route summarization in OSPF, EIGRP or BGP) or to write one broad rule.
Beware: the supernet can include addresses that were not in your list. If your networks are 10.1.0.0/24 and 10.1.3.0/24, the supernet is 10.1.0.0/22, which also contains 10.1.1.0/24 and 10.1.2.0/24. For a firewall, use the exact list of blocks; for a summary route, make sure those gaps are not used elsewhere in your network.
Common use cases
- Firewalls and access lists: turn the ranges a provider gives you (for example, the IPs of a cloud service) into CIDR blocks your device accepts.
- Block lists and allow lists: merge hundreds of single IPs and overlapping networks into the fewest entries.
- Address planning: check whether several subnets can be advertised as one route.
- Networking exams and labs (CCNA, college courses): check summarization exercises done by hand.
Frequently asked questions
What formats can I paste?
Single IPs (10.0.0.1), CIDR blocks (10.0.0.0/24), hyphenated ranges (10.0.0.1 - 10.0.0.50) and IPv6 too. Separate them with new lines, commas or semicolons. Lines starting with # are ignored.
Can I mix IPv4 and IPv6?
Yes. Each version is merged separately and the result shows the IPv4 blocks first and then the IPv6 ones, each with its own supernet.
What if I enter a network with host bits set, like 192.168.1.77/24?
The network it belongs to is used: 192.168.1.0/24. That is what a router would do if you configured that route.
Is there a line limit?
You can paste up to 1,000 lines at once. If the result has many blocks, the table shows the first ones, but the «Copy the list» button copies all of them.