What this CIDR converter does
- Range to CIDR: enter
192.168.0.10 - 192.168.0.200and get the minimal list of CIDR blocks that covers exactly that range. Firewalls, cloud security groups and routers usually accept only CIDR notation. - CIDR to range: enter
10.0.0.0/22to see its first and last address and how many addresses it contains. - Aggregate a list: paste many blocks, one per line, and get a merged list with overlaps and adjacent blocks combined. Handy for allowlists and route summarisation.
- IP in range check: add an IP address to test whether it falls inside any of the blocks.
Why a range becomes several CIDR blocks
A CIDR block always contains a power-of-two number of addresses and must start on a boundary that is a multiple of its size. An arbitrary range such as .10 to .200 does not line up with those boundaries, so it has to be split into several aligned blocks: .10/31, .12/30, .16/28 and so on. The converter finds the smallest such set. To understand prefixes and masks in depth, read subnet masks and CIDR notation or use the subnet calculator.
Common uses
- Turning a provider's published IP ranges into firewall rules.
- Building geo or ASN allowlists from ASN prefix lists.
- Checking whether a client IP from your logs belongs to a trusted network.
- Summarising many routes into fewer aggregate announcements.
Frequently asked questions
Does it work with IPv6?
Yes. Ranges, CIDR blocks and the containment check all support IPv6. Separate lists are aggregated per IP version.
How many lines can I enter?
Up to 200 lines per conversion.