IP Range to CIDR Converter
Turn any IPv4 address range into the smallest possible list of CIDR blocks — one range or a whole batch at a time.
Worked example: 192.168.1.10 – 192.168.2.200
The converter walks the range from left to right and emits the largest aligned block that starts at the current address and still fits inside the remaining span. That greedy strategy is guaranteed to produce the minimal set of blocks. For 192.168.1.10 – 192.168.2.200 (447 addresses) it produces 10 blocks:
| # | CIDR block | Addresses |
|---|---|---|
| 1 | 192.168.1.10/31 | 2 |
| 2 | 192.168.1.12/30 | 4 |
| 3 | 192.168.1.16/28 | 16 |
| 4 | 192.168.1.32/27 | 32 |
| 5 | 192.168.1.64/26 | 64 |
| 6 | 192.168.1.128/25 | 128 |
| 7 | 192.168.2.0/25 | 128 |
| 8 | 192.168.2.128/26 | 64 |
| 9 | 192.168.2.192/29 | 8 |
| 10 | 192.168.2.200/32 | 1 |
Notice how the first block (192.168.1.10/31) absorbs only two addresses because 10 is even but not divisible by four, while later blocks grow as alignment allows. Routing tables prefer this minimal cover because each entry consumes hardware memory.
When you need range-to-CIDR conversion
- Summarizing firewall or routing-policy scopes into the fewest prefix-list entries.
- Importing IP inventories exported as first/last pairs into CIDR-based tooling.
- Checking whether an allocation can be expressed as a single aggregate before requesting it from an RIR.
Planning subnets inside one of the resulting blocks? The VLSM calculator splits it by host requirements.