IP Range to CIDR

Enter a start and end IPv4 address to get the minimal set of CIDR blocks that exactly covers that range.

IP Range

Quick Examples

Enter a start and end IP address, then click Convert.

Copied!

Summary

Enter a start and end IPv4 address to get the minimal set of CIDR blocks that exactly covers that range.

How it works

  1. Enter the start IPv4 address of your range (e.g. 192.168.1.0).
  2. Enter the end IPv4 address of your range (e.g. 192.168.1.255).
  3. Click Convert to generate the minimal CIDR block list.
  4. The tool finds the largest aligned CIDR block that fits within the remaining range, subtracts it, and repeats until the range is fully covered.
  5. Copy individual blocks or the full list with one click.

Use cases

  • Define firewall allow/deny rules for an IP range from an ISP or cloud provider.
  • Configure routing tables that accept CIDR notation instead of raw ranges.
  • Summarize IP allocation records into compact CIDR notation for documentation.
  • Verify that a list of CIDR blocks covers exactly the IP range you intended.
  • Convert geo-IP database ranges into CIDR for use in nginx or iptables rules.
  • Audit cloud security groups that require CIDR inputs.

Frequently Asked Questions

Last updated: 2026-06-10 · Reviewed by Nham Vu