Networking

IP Range ↔ CIDR

Convert an IPv4 start–end range into the smallest set of CIDR blocks, and back.

Range → CIDR

CIDR → range

Why summarise a range into CIDR

Firewalls, route tables and ACLs take CIDR blocks (10.0.0.0/24), not arbitrary start–end ranges. This finds the smallest set of CIDR blocks that cover a range exactly — no more, no less — so you can turn "allow 10.0.0.5 through 10.0.1.40" into the precise prefixes a device understands. An arbitrary range rarely collapses to one block; it's broken into aligned power-of-two pieces.

How it works

Starting at the first address, the tool repeatedly takes the largest block that both aligns to the current address and fits inside what's left of the range, then advances. The reverse panel expands any CIDR back into its first and last address and host count. Both run entirely in your browser.

These calculators run entirely in your browser — nothing you type is sent anywhere. Results are estimates for planning; validate against your vendor's documentation before you buy or deploy.