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.

Single-range mode. For multiple ranges at once, leave these blank and use batch mode below.

Each line is either start-end or start end. Batch lines take priority over the fields above.

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 blockAddresses
1192.168.1.10/312
2192.168.1.12/304
3192.168.1.16/2816
4192.168.1.32/2732
5192.168.1.64/2664
6192.168.1.128/25128
7192.168.2.0/25128
8192.168.2.128/2664
9192.168.2.192/298
10192.168.2.200/321

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

Planning subnets inside one of the resulting blocks? The VLSM calculator splits it by host requirements.