IP range to CIDR

Turn a start–end IPv4 range into the minimal CIDR blocks that cover it.

Convert an IPv4 start–end range into the minimal set of CIDR blocks — for firewall rules and allow lists.

Runs in this browser.

How to use

  1. Enter the first IP.
  2. Enter the last IP.
  3. Read the covering CIDR list.

What it supports

IPv4 only, start ≤ end, up to 128 output blocks; 0.0.0.0–255.255.255.255 yields 0.0.0.0/0. IPv6 ranges and reverse DNS are out of scope.

Related tools

Related guides