IPv4 range expander
Expand an address range between a start and an end IP into the minimal list of covering CIDRs with address counts, and convert a CIDR back into its address range with validation.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Minimal CIDR list
8191| CIDR | Address range | Addresses |
|---|---|---|
| 192.168.1.10/31 | 192.168.1.10 – 192.168.1.11 | 2 |
| 192.168.1.12/30 | 192.168.1.12 – 192.168.1.15 | 4 |
| 192.168.1.16/28 | 192.168.1.16 – 192.168.1.31 | 16 |
| 192.168.1.32/27 | 192.168.1.32 – 192.168.1.63 | 32 |
| 192.168.1.64/26 | 192.168.1.64 – 192.168.1.127 | 64 |
| 192.168.1.128/26 | 192.168.1.128 – 192.168.1.191 | 64 |
| 192.168.1.192/29 | 192.168.1.192 – 192.168.1.199 | 8 |
| 192.168.1.200/32 | 192.168.1.200 – 192.168.1.200 | 1 |
What this tool does
- Turn a start/end pair such as "192.168.1.10 to 192.168.1.200" into the fewest possible CIDRs, because firewall and cloud security-group rules only accept CIDR notation.
- Tidy up scattered address blocks: convert an untidy range into non-overlapping CIDRs you can paste straight into iptables, Nginx or an ACL.
- Check the other direction: given 10.0.0.0/8, see its first and last address plus the total count before you allow the whole thing.
- Debug "why can this IP not reach the service" by using the address count column to confirm the chosen block actually covers the target.
Example
Input
192.168.1.10 ~ 192.168.1.200
Output
192.168.1.10/31 (2) 192.168.1.12/30 (4) 192.168.1.16/28 (16) 192.168.1.32/27 (32) 192.168.1.64/26 (64) 192.168.1.128/26 (64) 192.168.1.192/29 (8) 192.168.1.200/32 (1)
8 blocks covering 191 addresses. The split is aligned to powers of two, so the CIDRs never overlap and there are as few as possible; the number in brackets is the block size including network and broadcast addresses.
Frequently asked questions
Why can’t one CIDR express an arbitrary range?
A CIDR block must be a power-of-two sized run of addresses whose start is aligned to that size. 192.168.1.10 to 192.168.1.200 is neither, so it has to be split. The tool guarantees the fewest non-overlapping blocks, which is exactly what a firewall rule wants.
Do the results include the network and broadcast addresses?
Yes. These are the addresses in the range, not the usable host range, so inside a /24 you will see both 192.168.1.0 and 192.168.1.255. If you need the host range with those two excluded, use the subnet calculator instead.
What if the start address is larger than the end address?
You get "the end address must not be smaller than the start address" — the tool will not silently swap them. Check which side is the start, or you may end up allowing a completely different block.
How does the CIDR-to-range direction work?
Enter 192.168.1.0/24 and you get start 192.168.1.0, end 192.168.1.255 and 256 addresses. Note that 192.168.1.37/24 is first masked down to the network address 192.168.1.0, matching how real routing treats it.
Does it support IPv6?
No, IPv4 only. IPv6 ranges follow the same power-of-two logic but use a different address length and notation and need their own tool; IPv6 input here is rejected as "not a valid IPv4 address".
Keywords:ipv4rangecidrsubnetip 范围网段地址范围范围转 cidrcidr 列表