IP Range to CIDR

Turn a start and end address into the fewest CIDR blocks that cover it.

What you provide

Result

8 CIDR blocks cover 191 addresses

Arbitrary ranges rarely fall on prefix boundaries, so 8 blocks is the smallest exact cover rather than a limitation of the tool. If the list is long, consider whether the range can be widened slightly to the next clean boundary. One /22 is easier to maintain than eleven mixed blocks, provided the extra addresses it takes in are genuinely yours to include.

CIDR blocks
192.168.1.10/31
192.168.1.12/30
192.168.1.16/28
192.168.1.32/27
192.168.1.64/26
192.168.1.128/26
192.168.1.192/29
192.168.1.200/32
Diagnostic telemetry
Range
192.168.1.10 – 192.168.1.200
Addresses
191
CIDR blocks needed
8
192.168.1.10/31
2 addresses
192.168.1.12/30
4 addresses
192.168.1.16/28
16 addresses
192.168.1.32/27
32 addresses
192.168.1.64/26
64 addresses
192.168.1.128/26
64 addresses
192.168.1.192/29
8 addresses
192.168.1.200/32
1 addresses

What this cannot tell you

  • IPv4 only. IPv6 ranges follow the same principle but use 128-bit arithmetic that this tool does not perform.
  • It converts a range into blocks. It does not check whether those blocks are routable, allocated to you, or safe to put in a rule.

Take this with you

IP Range to CIDR on RunTheTests — free browser-based netmath tools, no sign-up.