IP Range to CIDR Converter
Convert IP ranges to CIDR blocks, expand CIDRs to ranges and summarize networks
Tip: paste a whole range like 10.0.0.5 - 10.0.3.200 into the start field.
CIDR blocks
Accepts IP/prefix, IP mask or a single IP. Separate entries with new lines, commas or spaces.
Address ranges
| CIDR | First IP | Last IP | Addresses | Subnet mask | Wildcard |
|---|
Overlapping and adjacent entries are merged, duplicates removed. Ranges use start - end.
Exact summary
IP Range & CIDR Conversion Guide
Why ranges become several CIDR blocks and how to summarize routes
How to use the converter
- Range → CIDR: enter the first and last IP of any range. You get the shortest exact list of CIDR blocks, ready for firewall rules, ACLs or cloud security groups.
- CIDR → Range: paste one or more networks to see each block's first and last address, size, subnet mask and wildcard mask. Download the result as CSV.
- Summarize / merge: paste a list of networks, single IPs and ranges. Overlaps and neighbours are combined into the fewest possible prefixes, and you also get the single supernet that covers everything.
Where this helps
Firewall and ACL rules
Many firewalls, cloud security groups and iptables/nftables rules accept CIDR blocks but not arbitrary ranges. Convert a vendor's published IP range once and paste the blocks.
Route summarization
Advertise fewer prefixes in BGP or OSPF by merging contiguous networks. Four /24s that start on a /22 boundary become one /22.
Allow-lists and geo-blocks
IP lists from providers often contain duplicates and overlaps. Merging them first keeps rule sets short and fast to evaluate.
Auditing IP plans
Expanding CIDRs to first and last addresses makes it easy to spot overlapping subnets before they cause routing problems.
Frequently asked questions
How do I convert an IP range to CIDR notation?
Start at the first address and take the largest block that both begins on its own boundary and stays inside the range, then repeat from the next address until you reach the end of the range. For example, 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. This tool does that automatically and always returns the smallest possible list.
Why does one IP range turn into several CIDR blocks?
A CIDR block always contains a power-of-two number of addresses and must start on a multiple of its own size. A range that does not start and end exactly on those boundaries has to be covered by several smaller blocks.
How do I find the IP range of a CIDR block?
The first address is the network address: the IP with all host bits set to 0. The last address is the broadcast address: all host bits set to 1. A /24 such as 10.1.2.0/24 covers 10.1.2.0 to 10.1.2.255, which is 256 addresses.
What is route summarization?
Route summarization (also called supernetting or aggregation) combines several contiguous networks into fewer, larger prefixes. For example, 10.0.0.0/24 and 10.0.1.0/24 can be advertised as a single 10.0.0.0/23. Summarizing keeps routing tables, firewall rules and ACLs short.
What is the difference between an exact summary and a covering supernet?
An exact summary contains only the addresses you entered, which can require several prefixes. A single covering supernet is the smallest one prefix that contains every input, but it may also include addresses you did not list. The tool shows both and how many extra addresses the supernet adds.
More Networking & IP Tools
Free browser-based utilities for network engineers and system administrators
Thank you for your message.