IP Range to CIDR Converter

Firewall rules, ACLs, allowlists and BGP filters all speak CIDR — but address allocations rarely arrive that way. You get told "everything from 10.0.0.1 to 10.0.0.6" and have to turn that into blocks a router accepts. Done by hand that means binary alignment math; done wrong it means either a rule per address or a sloppy /29 that lets in two addresses you never intended. This converter does the summarization exactly: the smallest set of non-overlapping CIDR blocks that covers your range — no more, no less.

Enter a start and end address above (the IP range mode is pre-selected) and the decomposition appears instantly, with a copy-all button for pasting straight into a config. IPv6 ranges work too, and because the math runs on big integers rather than walking addresses one by one, even a range the size of the entire IPv6 space collapses to ::/0 in a single step.

FAQ

Why does one range become several CIDR blocks?

CIDR blocks must be power-of-two sized and aligned to their size, and most ranges don't line up that neatly. 10.0.0.1–10.0.0.6 can't be one block, so the exact answer is four: 10.0.0.1/32, 10.0.0.2/31, 10.0.0.4/31 and 10.0.0.6/32. Together they cover precisely your range — nothing extra sneaks in.

Is the summarized list really minimal?

Yes. At each step the converter takes the largest block that is both aligned at the current address and fully inside the remaining range, which is provably the fewest blocks possible. An aligned range like 10.0.0.0–10.0.0.255 collapses to a single /24.

Can I convert an IPv6 range to CIDR?

Absolutely — start and end just need to be the same family. IPv6 ranges decompose at full 128-bit precision, and the total address count stays exact even past 2^53, where floating-point tools start lying.

Read the full CIDR Calculator guide and the CIDR Calculator API reference.