← All Docs

IP Range to CIDR Converter

Convert any start and end IP address into the exact minimal list of CIDR blocks, for firewalls and cloud rules that only take CIDR notation, IPv4 or IPv6.

Try IP Range to CIDR Converter →

What Does the Range to CIDR Converter Do?

Many firewalls, cloud security groups, and allow lists accept CIDR blocks but not address ranges. This converter takes a start and an end address and returns the shortest list of CIDR blocks that covers exactly that range, no more and no less. A range like 10.0.0.1 to 10.0.0.6 becomes 10.0.0.1/32, 10.0.0.2/31, 10.0.0.4/31, and 10.0.0.6/32.

How Do I Convert a Range to CIDR?

  1. Open IP Tools > CIDR Toolkit from the top menu and choose the Range to CIDR tab.
  2. Enter the first address of the range in Start address.
  3. Enter the last address in End address. You can also type both into the first box as a - b and leave the second empty.
  4. Press Convert or Enter.
  5. Read the address count and the number of CIDR blocks, then the exact block list.
  6. Use Copy or Download .txt to paste the blocks into your rule.

Why Does One Range Need Several Blocks?

A CIDR block always covers 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 on such boundaries is cut into the largest aligned blocks that fit, working from the start address forward. A DHCP pool from .100 to .199, for example, needs five blocks. Ranges that line up with a boundary, such as 192.168.1.0 to 192.168.1.255, become a single block.

When Would I Convert a Range to CIDR?

  • Cloud rules: AWS, Azure, and Google Cloud security rules take CIDR blocks, not ranges.
  • Vendor allow lists: convert a provider's published start and end addresses into rules.
  • DHCP pools: express a pool as CIDR blocks for a firewall object or monitoring filter.
  • Geo and abuse feeds: turn range-based lists into CIDR for routers and proxies.

Frequently Asked Questions

How do I convert an IP range to CIDR?

Enter the start and end addresses and press Convert. The tool returns the minimal list of CIDR blocks that covers exactly that range, which you can copy straight into a firewall or cloud rule.

Is the result exact?

Yes. The blocks cover every address from start to end and nothing outside it. The address count is shown so you can confirm the size of the range.

Does it work for IPv6 ranges?

Yes. Both addresses must be the same family. IPv6 output uses the compressed RFC 5952 form, and counts stay exact for very large ranges.

Can I paste a range like 10.0.0.0-10.0.0.127?

Yes. Put the whole range in the start box, with or without spaces around the dash, and leave the end box empty.

Are my addresses sent anywhere?

No. Every calculation runs in your browser with exact 128-bit math. Nothing you paste is uploaded, logged, or saved, and the page works the same offline once loaded.