Guide
This converter turns any IP range into the smallest set of CIDR blocks that covers it exactly, expands CIDR blocks into first and last addresses, merges long lists into a tidy aggregate, and tells you whether a given IP falls inside them. It works with IPv4 and IPv6, and with single addresses mixed in.
How to use it
- Paste your entries into the big box. Each entry can be a range (
192.168.1.10 - 192.168.1.100), a CIDR block (10.0.0.0/23) or a single address (203.0.113.7). Put one per line, or separate them with commas or semicolons. - Optionally type an address in Is this IP inside? to test it against everything you entered.
- Press Convert. If you tested an address, a green or red verdict appears first, then the conversion table and the merged list.
- Use the Copy button on the merged list to paste it straight into a firewall, security group or allowlist.
Reading the results: a worked example
Suppose you enter these five lines and test 10.0.3.9:
192.168.1.10 - 192.168.1.10010.0.0.0/2410.0.1.0/2410.0.2.0/2310.0.1.77
- Verdict: "10.0.3.9 is inside the range, matched by 10.0.2.0/23". The match names the exact block, so you know which rule would catch the address.
- Conversion table: one row per input line with its first address, last address, address count and CIDR blocks. The range line becomes seven blocks:
192.168.1.10/31,.12/30,.16/28,.32/27,.64/27,.96/30and.100/32, covering exactly 91 addresses. The single address becomes10.0.1.77/32. - Merged (aggregated) CIDR list: the three 10.0.x blocks are adjacent and aligned, so they collapse into one
10.0.0.0/22. The lone10.0.1.77disappears because the /22 already covers it. - Addresses in total: 1,115, counted after merging, so overlaps are not counted twice (1,024 in the /22 plus the 91 in the range).
Why a range becomes several CIDR blocks
A CIDR block always holds a power-of-two number of addresses (1, 2, 4, 8 …) and must start on a multiple of its own size. A /27 can start at .0, .32, .64 or .96, but never at .10. An arbitrary range such as .10 to .100 does not line up with those boundaries, so it has to be built from several aligned pieces, largest first where they fit. The converter always returns the minimal set. If a provider gives you a range that turns into a dozen blocks, that is normal, not a mistake.
To understand prefixes and masks in depth, read subnet masks and CIDR notation, or open a single block in the subnet calculator to see its mask, wildcard and usable hosts.
Practical scenarios
Allowlisting a service's IP ranges
Payment providers, monitoring services and CDNs publish lists of addresses their requests come from. Paste the list, copy the merged output, and you usually end up with fewer firewall rules than you started with. Re-check whenever the provider updates its list.
Blocking or allowing a whole network
To filter traffic from one organisation, look up its prefixes with the ASN lookup, paste them here and use the merged list. Be careful: large networks such as cloud providers host many unrelated customers.
Is this visitor from a trusted network?
Paste your office, VPN and partner ranges, then put the address from your server logs in the check box. The verdict tells you if it belongs and which block matched. If the address looks unfamiliar, the IP address type checker tells you whether it is public, private or special-use.
Cleaning up an old firewall config
Rule sets that have grown over years often contain blocks inside other blocks. Paste them all: any entry that vanishes from the merged list is already covered by another one and is a candidate for removal.
Limits
- Up to 200 entries per conversion. Split longer lists into batches.
- Blocks with host bits set, such as
10.0.0.5/24, are accepted and read as their network,10.0.0.0/24. Check that this is what you meant. - A range written backwards (
.200 - .10) is swapped automatically. Both ends of a range must be the same IP version. - IPv4 and IPv6 blocks are merged separately; the merged list shows IPv4 first.
- The tool does no lookups. It cannot tell you who owns a block or whether it is routed on the internet.
Privacy
The conversion is plain arithmetic on our server. Nothing is looked up or stored, but your entries do appear in the page URL, so avoid sharing the link if your internal ranges are sensitive.
Frequently asked questions
Does it work with IPv6?
Yes. Ranges such as 2001:db8::1 - 2001:db8::ff, CIDR blocks and the containment check all support IPv6. IPv4 and IPv6 entries are aggregated separately.
How many lines can I enter?
Up to 200 entries per conversion, separated by new lines, commas or semicolons.
How do I convert an IP range to CIDR?
Enter the range as start - end and press Convert. The CIDR blocks column lists the smallest set of blocks that covers exactly that range, with no addresses missing and none extra.
How do I find the first and last IP of a CIDR block?
Enter the block, for example 10.0.0.0/22, and read the first and last address columns: 10.0.0.0 to 10.0.3.255, 1,024 addresses. For usable host addresses rather than the raw range, use the subnet calculator.
How do I check if an IP address is in a CIDR range?
Enter the ranges in the main box and the address in "Is this IP inside?". You get a yes or no verdict and the exact block that matched.
Why does merging give me fewer blocks?
Two adjacent blocks of the same size combine into one block twice as big if they start on the right boundary, and any block inside another is dropped. That is why 10.0.0.0/24, 10.0.1.0/24 and 10.0.2.0/23 become a single 10.0.0.0/22.
Updated
Comments
Share a tip, ask a question or tell others how the tool worked for you.