About this tool
Firewalls, cloud security groups and allowlists usually expect networks in CIDR notation such as 10.0.0.0/23. In practice, though, you often have ranges (“10.0.0.5 to 10.0.0.20”) or long, unordered lists with overlaps. The CIDR range calculator puts both into shape – for IPv4 and IPv6.
It splits a range into the smallest possible number of CIDR blocks, merges lists (sorts, removes duplicates, joins overlapping and adjacent networks) and checks which entries of a list contain a given IP. Work through single networks with the IP Subnet Calculator; notations of single addresses are shown by the IP Address Converter.
How it works
- Choose the function: range → CIDR, merge list or check IP.
- Enter the first and last address or paste a list – one entry per line, comments after # are ignored.
- Read the CIDR blocks or merged ranges including the number of addresses.
- Copy the result straight into your firewall or cloud configuration.
Frequently asked questions
Why does a range result in several CIDR blocks?
A CIDR block always covers a power of two addresses and starts at a matching boundary. 10.0.0.5 to 10.0.0.20 can therefore only be represented exactly with five blocks: /32, /31, /29, /30 and /32. Ranges that start and end at block boundaries, on the other hand, give a single block.
What happens when merging?
All entries are sorted, duplicates removed and networks that overlap or are directly adjacent are joined. 10.0.0.0/24 and 10.0.1.0/24 become 10.0.0.0/23. The result covers exactly the same addresses – no more, no less.
Does it work with IPv6?
Yes, IPv4 and IPv6 may be mixed in one list and are merged separately. Only a single range has to stay within one IP version.
Which formats can I paste?
Networks in CIDR notation (10.0.0.0/8), ranges with a dash (10.0.0.1 - 10.0.0.9) and single addresses. Entries can be separated by line breaks, commas or semicolons. A network like 10.1.2.3/8 is automatically related to its network address 10.0.0.0/8.