Convert a start and end IPv6 or IPv4 address into the smallest list of CIDR blocks that covers the range exactly, ready for firewalls and ACLs.
About this tool
Convert a start and end IPv6 address into the smallest list of CIDR blocks.
How to use IPv6 Range to CIDR
- Enter the first address of the range.
- Enter the last address of the range.
- Copy the list of CIDR blocks and the address count shown above it.
Worked example
The range 192.168.0.10 to 192.168.0.20 needs four blocks: 192.168.0.10/31, 192.168.0.12/30, 192.168.0.16/30 and 192.168.0.20/32.
Why can one range need several blocks?
A CIDR block must start on a boundary that matches its size, so ranges that do not line up are split into several blocks.
Does it work for IPv4?
Yes. If the start address is IPv4, the range is calculated as IPv4.
- IPv6 Range to CIDR — Convert a start and end IPv6 address into the smallest list of CIDR blocks.
Explore IP & Network Tools · More practical guides