CIDR to IP List

Expand ranges into IP lists with sampling control.

Expand ranges Sample output Export ready

Output controls

Avoid overly large lists by sampling or setting limits.

First / last Sampling CSV

What This Tool Does

This page expands a CIDR block into individual IP values without changing the current form, limits, or export controls. It is useful when a script, inventory, or allowlist needs explicit addresses instead of prefix notation.

Inputs explained

Enter a CIDR block, choose whether you want a full list, a sample, or only the first and last values, then set a maximum output size.

How it works

The tool calculates the address span inside the CIDR, then generates addresses according to the chosen mode and export format.

Step-by-Step Example

Expand 192.0.2.0/28 to generate the full set of addresses in that block, or switch to a sampled mode if you only need representative values for testing.

Use Cases

Use CIDR expansion for inventory exports, scripting, scanning plans, and any workflow that needs explicit IP values.

Assumptions and limitations

Large prefixes can produce very large outputs. Sampling and maximum item settings are important for practical use.

Frequently Asked Questions

How do I convert CIDR to an IP range list?

The number of addresses in a CIDR block is calculated with 2^(32 - prefix length) for IPv4. A /24 gives 2^(32 - 24), which is 256 total addresses. In traditional IPv4 subnets, the first address is the network address and the last is the broadcast address, leaving 254 usable host addresses. Point-to-point and cloud environments may treat edge cases differently, so always check the platform. A CIDR calculator helps students see total count, usable count, first IP, last IP, and host range together.

How many IP addresses are in this CIDR block?

A /24 subnet contains 256 total IPv4 addresses. For example, 192.168.10.0/24 runs from 192.168.10.0 through 192.168.10.255. In normal LAN subnetting, usable host addresses are 192.168.10.1 to 192.168.10.254 because .0 is the network address and .255 is the broadcast address. When you list all IPs, decide whether the output should include reserved addresses. For inventory imports, scanners, and firewall objects, full lists are useful, but host configuration usually needs the usable range.

How do I list all IPs in a /24 subnet?

Expanding CIDR notation means turning a compact prefix like 10.20.30.0/28 into its full address range or individual IP list. A /28 has 16 total addresses, so the range runs from 10.20.30.0 to 10.20.30.15. The expanded output may show every address, or just the first IP, last IP, network, broadcast, and usable hosts. This is helpful when someone gives you only a CIDR block but your firewall, monitoring tool, or asset sheet expects plain IP addresses.

How do I expand CIDR notation?

To get the first and last IP from CIDR, calculate the network boundary and the end of the block. For 192.168.5.64/26, the full range is 192.168.5.64 to 192.168.5.127. In normal IPv4 LAN use, the first usable host is 192.168.5.65 and the last usable host is 192.168.5.126. The difference matters. Network and broadcast addresses identify the subnet itself, while usable host boundaries are what you assign to devices, DHCP pools, and server interfaces.

How do I get the first and last IP from CIDR?

Exporting a CIDR IP list to CSV is practical when another system needs the addresses one per row. Common uses include firewall imports, vulnerability scanner targets, SIEM enrichment, asset inventory, and migration tracking. Enter the CIDR, generate the list, choose whether to include network and broadcast addresses, then export the result. For large blocks, be sensible. A /16 has 65,536 total addresses, so the CSV can get large quickly. I usually export only what the next tool actually needs.

How can I export a CIDR IP list to CSV?

Whether a CIDR IP list should include network and broadcast addresses depends on the job. For host assignment in a traditional IPv4 subnet, exclude them because they are reserved. For documentation, range validation, subnet math, or firewall object review, including them can be useful because it shows the true boundaries. IPv6 is different because it does not use broadcast addresses. A good tool should let you choose full range or usable hosts, so the output matches the task instead of forcing one rule.

Should a CIDR IP list include network and broadcast addresses?

When a CIDR list is very large, think before expanding it. A /24 is manageable with 256 addresses, but a /12 contains more than one million IPv4 addresses. Listing every IP may slow a browser, create huge CSV files, and add little value. For routing or firewall summaries, the CIDR block itself is usually better. Expand only when the downstream task needs individual addresses, such as a small scanner list or a lab exercise. The formula 2^(32 - prefix) tells you the size before you export.

Related Tools

IPv4 Subnet Calculator

Inspect subnet boundaries before expanding them.

IPv6 Calculator

Review IPv6 prefix details before generating address lists.