IP Range to CIDR
Give it a start and an end address. It returns the smallest exact set of prefixes covering that range and nothing more.
Local toolYour network plan stays in your browser. Nothing you enter is uploaded, logged, or sent to any server.
Why a range often needs several prefixes
A CIDR prefix can only start on an address that is a multiple of its own size. So a range beginning at 192.168.1.1 cannot be a single block — the first address is not aligned to anything larger than a /32.
The algorithm walks from the start, taking the largest block that both begins at the current address and does not run past the end, then repeats. That produces the minimal exact set.
Exact means exact. The result never includes an address outside the range you gave. Tools that return a single "closest" prefix are giving you a supernet that covers addresses you did not ask for, which in a firewall rule is a security problem rather than a rounding convenience.
Related tools
CIDR Aggregator merges a list of prefixes. CIDR Range Calculator goes from a prefix to its boundaries.