Skip to content
AZ Tools

IP Range Expander

Expand a CIDR block (10.0.0.0/24) into a list of IPs, or convert a start-end range into the smallest covering CIDR set.

Summary
Network
192.168.1.0/29
Broadcast
192.168.1.7
First usable
192.168.1.1
Last usable
192.168.1.6
Subnet mask
255.255.255.248
Wildcard mask
0.0.0.7
Total addresses
8
Usable hosts
6
IPs (8)
192.168.1.0
192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.4
192.168.1.5
192.168.1.6
192.168.1.7

All math runs locally. No DNS lookups, no network requests.

How to use

  1. Pick CIDR mode for network/prefix input, or Range mode for start - end.
  2. Adjust the limit if you want more (or fewer) IPs listed. The summary always shows totals regardless.
  3. Copy the IP list or the CIDR aggregation in your preferred format (lines, comma, or nmap-style space-separated).

About this tool

Show

Two modes in one tool. CIDR mode takes something like 192.168.1.0/24 and returns the network address, the broadcast address, the first and last usable host, the subnet mask, the wildcard mask, the total and usable address counts, and the expanded list of addresses up to the limit you set. Range mode takes a start and an end address and decomposes the span into the smallest set of CIDR blocks that covers it exactly — no more, no less — which is what firewall rules, ACLs and route tables want when you can only express things as prefixes.

The decomposition is worth understanding, because the answer is often larger than people expect. A range that starts or ends off a power-of-two boundary cannot be one prefix. 10.0.0.1 to 10.0.3.255 needs ten blocks — a /32, then a /31, /30, /29, /28, /27, /26, /25, /24 and finally a /23 — because each step can only double once the alignment allows it. If a rule set has a hard limit on entries, that expansion is the number to check before committing to a range.

The usable-host count follows the special cases rather than the naive formula. A /24 holds 256 addresses of which 254 are assignable, since the first is the network identifier and the last is the broadcast address. But a /31 has no room for either and RFC 3021 makes both of its addresses usable on a point-to-point link, and a /32 is a single host — so the tool reports 2 and 1 rather than 0 and −1, which is what subtracting two blindly would give.

Two limits to know. This is IPv4 only; IPv6 prefixes are not accepted, and expanding one would be meaningless anyway — a single /64 holds more addresses than IPv4 has in total. And the expansion is capped deliberately: a /16 is 65,536 addresses and a /8 is over sixteen million, so the list is truncated at your configured limit and marked as such rather than locking up the tab. Nothing here touches the network — no DNS lookups, no reachability tests — so a result says only what the arithmetic says, never whether an address answers.

Frequently asked questions

Why does /31 have 2 usable hosts but /24 has 254?

RFC 3021 reserves the network and broadcast addresses for /0 through /30, leaving size - 2 usable. /31 and /32 are special: /31 is used for point-to-point links where both addresses are usable, and /32 is a single host.

Why is there an output limit?

A /16 is 65,536 IPs, /8 is 16,777,216. Rendering them all into the DOM would freeze your browser. The summary still computes the totals correctly; the list is just truncated for display.

Why does an arbitrary start-end range need several CIDR blocks?

Because a CIDR block is not any range — it is a run of addresses whose length is a power of two and whose start is aligned to that length. A range like .10 to .200 fits neither condition, so it has to be covered by a set of aligned blocks of decreasing size. That is also why moving the start by one address can change how many blocks come out.

Can I paste these lists straight into a firewall?

Check the form the device wants first. Some accept CIDR, some want a start-end pair, some take a mask and others a wildcard mask with the bits inverted, and a rule written in the wrong one either fails to load or silently matches something much wider than intended. Where a device accepts CIDR, prefer it: a summarised block is one rule to review rather than hundreds of lines nobody will read.

Guides on this topic

Related tools