IPLokus

CIDR Calculator

Convert an address range into the smallest set of CIDR blocks that covers it exactly. Free, no API key, no sign-up.

Working from one block rather than a range? Use the Subnet Calculator.

Turn a range into prefixes

Firewalls and allow lists want CIDR notation, but the range you actually have is often something like 192.168.1.5 to 192.168.1.20. This tool returns the smallest set of CIDR blocks that covers that range exactly, with no addresses left over and none added.

Enter the lower address first. For the full detail of a single block, use the Subnet Calculator.