IP Range to CIDR Calculator

Convert an IPv4 start and end range into the smallest possible list of CIDR blocks.

This tool is useful when you have an IP range such as 192.168.1.10 - 192.168.1.20 and need to turn it into CIDR notation for:

  • Firewall and ACL rules
  • Route tables
  • Cloud security controls
  • Migration allowlists
  • Network documentation

The calculator runs locally in your browser and does not send input to a backend service.


What This Tool Calculates

Given a start IP and end IP, the calculator returns:

  • The normalized start and end addresses
  • Total IPs covered by the range
  • The minimum CIDR block list required to cover the range
  • Copyable CIDR output
  • Errors for invalid, empty, or reversed ranges

If the range aligns perfectly to one CIDR block, the result is short.

Example:

  • Start IP: 192.168.1.0
  • End IP: 192.168.1.255
  • Result: 192.168.1.0/24

If the range does not align cleanly, the tool returns multiple CIDR blocks.


Example: Convert an Uneven IP Range to CIDR

Range:

192.168.1.10 - 192.168.1.20

Minimal CIDR output:

192.168.1.10/31
192.168.1.12/30
192.168.1.16/30
192.168.1.20/32

That output covers exactly the requested addresses without expanding the range to unrelated IPs.

This matters when the result will be used in firewall rules, allowlists, route tables, or security group objects.


Multiple IP Ranges

You can paste more than one range into the multiline field.

Supported formats:

10.0.0.0 - 10.0.0.255
10.0.1.0, 10.0.1.127
prod, 10.0.2.10, 10.0.2.20

Labels are optional, but they are helpful when converting ranges from spreadsheets, firewall exports, or migration plans.


IP Range to CIDR vs CIDR to IP Range

Use this page when you have:

  • a start IP
  • an end IP
  • a plain IP range that must be converted into CIDR notation

Use the CIDR to IP Range Calculator when you already have a CIDR block and want to see:

  • network address
  • broadcast address
  • subnet mask
  • wildcard mask
  • first and last usable IP

The two tools solve opposite sides of the same problem.


Common Mistakes This Tool Helps Prevent

  • Expanding a firewall rule wider than intended
  • Treating a non-aligned IP range as if it were a single CIDR
  • Reversing the start and end address
  • Copying invalid octets from spreadsheets
  • Forgetting that exact range coverage may require multiple CIDR blocks

Frequently Asked Questions

Can every IP range be represented as one CIDR block?

No. Many IP ranges require multiple CIDR blocks if the start and end addresses do not align to CIDR boundaries.

Does this support IPv6?

Not yet. This tool currently supports IPv4 ranges only.

Does this include cloud-reserved IP behavior?

No. This is a classic IPv4 range conversion tool. For provider-aware usable IP counts, use the Cloud Usable IP Calculator.

Can I use the output in firewall rules?

Yes, but always review the generated CIDR list before applying it to production firewall, ACL, or route policies.