1. Home
  2. Developer tools
  3. CIDR to IP Range

CIDR to IP Range

Paste CIDR blocks and see where each begins and ends. Switch on the list to get every address, for scripts and allow lists.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use CIDR to IP Range

  1. Paste CIDR blocks, one per line.
  2. Read the first and last address of each.
  3. Optionally list the addresses and download them.

Features

  • IPv4 and IPv6
  • Exact sizes with big integers
  • Address list capped for responsiveness
  • Warns when host bits are set
  • Copy as TSV
  • Download the list

Supported formats

Input

  • CIDR blocks
  • Typed or pasted text

You get

  • First and last address
  • Address count

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the CIDR to IP Range is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • IPv4 blocks only.
  • Addresses with host bits set are shown with the network address they belong to.

Guide

Expanding CIDR blocks into first and last addresses

A cloud provider publishes its address ranges as CIDR blocks. Your tool, spreadsheet or old firewall wants a start and an end. The page converts a list of blocks into the first and last address of each, with the size, and can list the individual addresses of a small block when you need them.

How a prefix defines a range

The prefix length says how many leading bits are fixed. The remaining bits can take every value. The first address sets all of them to zero and the last sets them all to one. A /28 fixes 28 bits and leaves 4, so there are 2⁴ = 16 addresses; 10.0.0.0/22 leaves 10 bits for 1,024 addresses, running from 10.0.0.0 to 10.0.3.255. The block is always aligned: the first address is a multiple of the block size. A line that is not a CIDR block produces an error message with an example instead of a row.

What the table shows

Each input line becomes a row with the CIDR as you wrote it, the first address, the last address and the number of addresses, written with thousands separators. IPv6 blocks are handled the same way with 128-bit arithmetic, so 2001:db8:1::/120 gives 256 addresses ending in 2001:db8:1::ff. Use Copy as TSV to move the table to a spreadsheet. The option “List every address” turns each block into individual lines, up to the first 4,096 of that block.

Usable hosts versus addresses

A range is not the same as a list of hosts. In an ordinary IPv4 subnet the first address is the network address and the last is the broadcast address, and neither is assigned to a host, so a /28 offers 14 hosts out of 16 addresses. A /31 on a point-to-point link uses both, and a /32 is one host. IPv6 has no broadcast, but the first address of a subnet (the subnet-router anycast address) is reserved by convention. When you need host counts and masks too, use the Subnet Calculator.

A worked example

The sample list has four blocks. 192.168.10.0/28 runs from 192.168.10.0 to 192.168.10.15, 16 addresses. 10.0.0.0/22 runs from 10.0.0.0 to 10.0.3.255, 1,024 addresses. 203.0.113.0/30 runs from 203.0.113.0 to 203.0.113.3, 4 addresses. The IPv6 block 2001:db8:1::/120 runs from 2001:db8:1:: to 2001:db8:1::ff, 256 addresses. Switching on the listing option shows all 16 addresses of the first block, one per line.

Limits

Only the arithmetic is done. The page does not know whether a block is allocated, public or routable, and it does not remove overlaps between lines. The listing option is capped at 4,096 addresses per block to keep the page responsive; the first and last addresses and the count remain exact whatever the size. To go from a start and an end to blocks, use IP Range to CIDR.

Typical sources of CIDR lists

Blocks usually arrive in bulk. Cloud providers publish their address ranges as downloadable lists, for example the IP range files of Amazon Web Services and Google Cloud, and Cloudflare publishes the ranges of its edge network as plain text. Partners send allow lists, and registries publish allocations. Many older firewalls, spreadsheets and log tools cannot read CIDR notation and want a start and an end. Paste the list here, copy the table as tab-separated values, and sort the first-address column to spot overlaps.

Checked against the current version of the CIDR to IP Range on .

Frequently asked questions

How can I tell the size of a block from its prefix without a calculator?

Subtract the prefix from 32 and take two to that power. A /28 leaves four host bits, so 16 addresses; a /22 leaves ten, so 1,024. Every extra prefix bit halves the block.

Why does the page stop at 4,096 addresses?

Listing a /8 would mean sixteen million lines, which would freeze a phone browser. The first and last addresses and the count are always exact; only the full listing is capped.

How many addresses are in a /22?

1,024. A /22 leaves 10 host bits, and 2 to the power 10 is 1,024.

Why is listing capped?

A /8 holds 16 million addresses and a /64 vastly more. Listing is limited to 4,096 per block so the page stays responsive.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.