CIDR and range converter
Firewalls, route filters and old spreadsheets often list addresses as ranges. Turn any first-to-last range into the smallest exact set of CIDR blocks, or turn blocks back into ranges. Works for IPv4 and IPv6.
Runs in your browser. Nothing you enter or upload is sent to us.
How to use it
Three steps
- Choose a direction. Range to CIDR turns first - last ranges into blocks. CIDR to range lists the first and last address of each block.
- Enter one per line. For ranges, write the first and last address with a dash between them. You can paste many lines at once.
- Copy the result. Copy every block or range in one go, ready for a firewall or router config.
Questions
Good to know
Why does one range become several blocks?
A CIDR block always starts on a multiple of its size and covers a power of two addresses. A range such as 10.0.0.1 - 10.0.0.254 doesn't line up, so it takes several blocks to cover exactly.
Is the list of blocks the shortest possible?
Yes. The converter uses the largest block that fits at each step, which gives the fewest blocks that cover exactly the range and nothing else.
Does it work for IPv6?
Yes. Both ends of a range must be the same version.
Can I merge many blocks into fewer?
Use the supernet and summarize tool. It merges overlapping and neighbouring blocks into the shortest list.
More free tools
Other tools you may need
IPv4 subnet calculator
Network, broadcast, usable range and masks for any block.
Open the toolIPv6 subnet calculator
First and last address, size, /64 count and reverse zone.
Open the toolSubnet mask cheat sheet
Every prefix from /8 to /32 with masks and host counts.
Open the toolSupernet and summarize
Merge many blocks into the shortest list for routes and ACLs.
Open the tool/24 planner
Split a /24 into customer, link and LAN blocks on a map.
Open the toolIP spreadsheet checker
Find duplicates, overlaps and typos in an Excel or CSV list.
Open the tool
Still tracking IPs in a spreadsheet?
IPAM Enterprise keeps every /24, block, customer and circuit in one portal, and checks each assignment for overlaps before it is saved.
