IPv4 range expander

Given a start and end IP, computes the minimal list of CIDR blocks covering that range — very practical when tidying firewall rules.

Given a start and an end IPv4 address, this tool calculates a valid IPv4 subnet along with its CIDR notation.

Steps and notes

What is IPv4 range expander?

Given a start and an end address, this tool finds the smallest CIDR block (or a minimal set of blocks) that covers the whole range. Useful when a firewall, cloud security group or routing table only accepts CIDR notation but your list of machines was defined by two endpoints.

  1. Enter the start IP
  2. Enter the end IP
  3. Read the generated CIDR list
  • If the range is not a contiguous block it is split into several CIDRs — that is expected

Frequently asked questions

Why is the result larger than my range?
CIDR blocks must start on a boundary and have a power-of-two size. If your start and end are not aligned, the covering block necessarily includes extra addresses on both sides — the tool picks the smallest such block.
Why did my range split into several CIDRs?
Some ranges cannot be covered by a single block without huge waste. The tool then returns the minimal set of contiguous blocks that exactly covers your endpoints, which is still valid for firewall rules.
What does /32 mean here?
/32 is a block of exactly one address — start and end are the same. It is the tightest possible rule and often what you want when whitelisting a single host.

Read the full step-by-step guide for this tool

Category: Network

Network & IP workflow

IPv4 Subnet Calculator → IPv4 range expander → IPv4 address converter → IPv6 ULA generator → MAC address generator → MAC address lookup → WHOIS lookup