IP range to CIDR.
Enter the first and last address of an IPv4 range to get the fewest subnets that cover it exactly.
Range
Subnets
8 subnets · 255 addresses
- 178.18.0.1/32
- 178.18.0.2/31
- 178.18.0.4/30
- 178.18.0.8/29
- 178.18.0.16/28
- 178.18.0.32/27
- 178.18.0.64/26
- 178.18.0.128/25
How it works
CIDR blocks always start on a boundary that matches their size, so most ranges can't be written as a single subnet. This tool splits the range into the largest blocks that fit, which gives the shortest possible list.
Useful for firewall rules, allow lists and routing tables, which usually take subnets rather than ranges.
More tools