IP Range to CIDR Converter

Instantly convert any arbitrary start and end IP address into the exact minimum set of standard CIDR routing blocks. Perfect for configuring cloud firewalls and routing tables.

Range to CIDR Converter

Valid IPv4 required
Valid IPv4 required

Calculated CIDR Blocks

CIDR BlockStart IPEnd IPTotal IPs

How to Use the IP Range to CIDR Converter

Because IP routing strictly adheres to binary boundaries, an arbitrary range of IP addresses usually cannot be represented by a single subnet mask. This tool breaks down any range into the fewest possible standard CIDR blocks.

  1. Enter Start IP: Type the lowest IP address of your range (e.g., 192.168.1.10).
  2. Enter End IP: Type the highest IP address of your range (e.g., 192.168.1.15).
  3. Convert: Click the "Convert to CIDR" button. The tool will calculate the exact blocks needed to cover your range perfectly, without spilling over into unauthorized IP space.
  4. Export: Use the Copy or Download buttons to easily grab the CIDR blocks and paste them directly into your AWS Security Groups, Azure NSGs, or firewall rules.

Example Conversion

If you need to whitelist IPs from 192.168.1.10 to 192.168.1.15, a single CIDR block cannot cover this precisely. The tool breaks it down into two blocks:

CIDR BlockStart IPEnd IPTotal IPs
192.168.1.10/31192.168.1.10192.168.1.112
192.168.1.12/30192.168.1.12192.168.1.154

Range to CIDR Frequently Asked Questions