Free IP tools

IP Range ↔ CIDR Converter

Choose a conversion. For a range, enter the smaller address first and use the same IP version for both. For a CIDR block, enter an address and its slash prefix.

When to convert a range to CIDR

Use this converter when a firewall or allowlist accepts CIDR blocks and you have a start and end address. To audit an existing CIDR rule, switch to CIDR to IP range and check the inclusive endpoints.

For example, 192.0.2.5 through 192.0.2.10 becomes 192.0.2.5/32, 192.0.2.6/31, 192.0.2.8/31 and 192.0.2.10/32. Copy the results to get one block per line.

Frequently asked questions

Why did I get more than one CIDR block?

Each CIDR block must contain a power of two addresses and start on the corresponding network boundary. The converter returns the fewest blocks that cover your range exactly.

What happens if the CIDR starts with a host address?

The converter finds the enclosing network. For example, 2001:db8::3/126 returns 2001:db8:: through 2001:db8::3.

For location and network details in your application, see the IPWho geolocation API.