Aggregate · supernet · overlaps · ranges
CIDR Tools
Paste a list of networks to summarize it and check it for overlaps, or turn an address range into CIDR blocks. IPv4 and IPv6.
Networks
One per line, or separated by commas. Masks and wildcards work too. Copying is disabled while any line is invalid, so a partial list is never mistaken for a complete check.
Aggregated routes
The fewest CIDR blocks that cover exactly the same addresses.
- 10.0.0.0/22
- 10.0.5.0/24
- 10.0.8.0/24
Supernet
The smallest single block that contains every network.
Overlaps
Pairs where one block contains the other, or both are the same. For a focused check with examples, use the CIDR overlap checker.
- line 3 10.0.2.0/24 contains line 5 10.0.2.128/25
Range to CIDR
First and last address of a range, inclusive. You can also paste a - b into the first field. There is a dedicated IP range to CIDR page with worked examples.
CIDR blocks
Each block is the largest one that starts at the next address and stays inside the range.
Prefix, netmask and wildcard
| Prefix | Netmask | Wildcard | Addresses | Usable hosts |
|---|---|---|---|---|
| /0 | 0.0.0.0 | 255.255.255.255 | 4,294,967,296 | 4,294,967,294 |
| /1 | 128.0.0.0 | 127.255.255.255 | 2,147,483,648 | 2,147,483,646 |
| /2 | 192.0.0.0 | 63.255.255.255 | 1,073,741,824 | 1,073,741,822 |
| /3 | 224.0.0.0 | 31.255.255.255 | 536,870,912 | 536,870,910 |
| /4 | 240.0.0.0 | 15.255.255.255 | 268,435,456 | 268,435,454 |
| /5 | 248.0.0.0 | 7.255.255.255 | 134,217,728 | 134,217,726 |
| /6 | 252.0.0.0 | 3.255.255.255 | 67,108,864 | 67,108,862 |
| /7 | 254.0.0.0 | 1.255.255.255 | 33,554,432 | 33,554,430 |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
What these tools do
Aggregation (route summarization) merges adjacent and overlapping blocks into the fewest prefixes that cover the same addresses, the list you would advertise from a router or put in a firewall object group. Supernet finds the single shortest prefix that holds everything; it is often broader than the inputs, and the tool reports how many extra addresses it pulls in. Overlap detection lists every pair where one block sits inside another, which is how duplicated routes and clashing VPC ranges show up.
How to summarize routes by hand
- Write the third octets of
10.0.0.0/24to10.0.3.0/24in binary: 00000000, 00000001, 00000010, 00000011. - The first 6 bits of that octet are the same in all four, so the common prefix is 8 + 8 + 6 = 22 bits.
- The summary is
10.0.0.0/22. It covers exactly the four /24s because all four are present and the block starts on a multiple of four.
If one of the four were missing, a single /22 would also cover the missing /24. Aggregation keeps the result exact; the supernet does not. Check any block in detail with the subnet calculator.
Questions
What is the difference between aggregation and a supernet?
Aggregation merges networks into the fewest CIDR blocks that cover exactly the same addresses. A supernet is one block that covers every input, and it may also cover addresses that were not in the list.
How do I summarize 10.0.0.0/24 through 10.0.3.0/24?
The four /24s are contiguous and start on a multiple of four, so they summarize to 10.0.0.0/22.
Why don't 10.0.1.0/24 and 10.0.2.0/24 merge into a /23?
A /23 must start on an even third octet. 10.0.1.0/24 and 10.0.2.0/24 are adjacent but straddle a /23 boundary, so the smallest single block that holds both is 10.0.0.0/22, which also includes 10.0.0.0/24 and 10.0.3.0/24.
How do I convert an IP range to CIDR?
Starting at the first address, take the largest block that starts there and does not pass the end of the range, then repeat from the next address. 192.168.1.10 to 192.168.1.20 becomes 192.168.1.10/31, 192.168.1.12/30, 192.168.1.16/30 and 192.168.1.20/32.
What does it mean when two subnets overlap?
CIDR blocks either do not overlap at all or one contains the other. An overlap usually means a duplicate route, a VPC peering conflict, or a subnet that was carved twice.