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 Block | Start IP | End IP | Total 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.
- Enter Start IP: Type the lowest IP address of your range (e.g.,
192.168.1.10). - Enter End IP: Type the highest IP address of your range (e.g.,
192.168.1.15). - 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.
- 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 Block | Start IP | End IP | Total IPs |
|---|---|---|---|
| 192.168.1.10/31 | 192.168.1.10 | 192.168.1.11 | 2 |
| 192.168.1.12/30 | 192.168.1.12 | 192.168.1.15 | 4 |