IP Range to CIDR Converter
Convert an address range into the smallest set of CIDR blocks that covers it exactly, or expand a CIDR block back into its first and last address. Works for IPv4 and IPv6.
Result
What the two notations mean
An IP range is a continuous run of addresses written as a start and an end,
for example 192.168.0.0 - 192.168.0.255. WHOIS records and abuse reports usually
use this form.
CIDR notation combines a network address with a prefix length, for example
192.168.0.0/24. Routers and firewalls use this form because it encodes the block
size in the address itself.
The two are not interchangeable. A CIDR block always starts on a power-of-two boundary, so an
arbitrary range often needs several blocks to cover it exactly. Entering
192.168.0.5 - 192.168.0.20 returns five blocks rather than one, which is the
correct minimal cover for that range.
Examples
192.168.0.0/24is192.168.0.0 - 192.168.0.255, 256 addresses10.0.0.0/8is10.0.0.0 - 10.255.255.255, 16,777,216 addresses2001:db8::/32is an IPv6 prefix holding 296 addresses