Emergency server help: get in touch

CIDR to IP Range and IP Range to CIDR Converter (IPv4 and IPv6)

Expand CIDR blocks into first and last address, host count and netmask, turn any start-end range into the minimal list of CIDR blocks, list every IP, and get ready-made block rules.

Where it runs
Runs in your browser
Last updated
October 12, 2026

This CIDR to IP range converter expands CIDR blocks into their first and last address and host count, turns any IP range into the smallest set of CIDR blocks, and lists every address in a block, for IPv4 and IPv6. It runs entirely in your browser: nothing you type is sent to our server.

Loading the tool… It runs in your browser and needs JavaScript.

Three modes

  • CIDR → range: network, last address, usable host range, number of addresses and hosts, netmask and wildcard for each block. Lines with host bits set (198.51.100.17/28) are rounded to the network (198.51.100.16/28).
  • Range → CIDR: the minimal list of blocks that covers exactly a start-end range, for example 192.0.2.10 – 192.0.2.200 needs 8 blocks.
  • List every IP: all addresses in a block or range, up to 65,536 (a /16), with a download.

Block rules for your server

Choose an output format to turn the blocks into rules you can paste: CSF (csf -d or csf.deny lines), nginx deny, Apache Require not ip, iptables/ip6tables or an nftables set. Check the ranges first: blocking a provider’s whole range can also block real users and search engines.

Usable hosts

In IPv4 the first (network) and last (broadcast) address of a subnet are not usable for hosts, except in /31 point-to-point links (RFC 3021) and /32 single hosts. IPv6 has no broadcast address, so every address in the block is counted.

For subnet planning with a visual bit map, see our IP subnet calculator; for many networks into one summary route, see the route summarization calculator.

How we checked it

We compared the address library behind this tool with Python’s ipaddress module on 1,105 random cases (range to CIDR, merging, IPv6 formatting, invalid input) with no differences, then checked the page in Chromium on desktop and phone widths.

Frequently asked questions

How do I convert an IP range to CIDR?

Paste the range as start – end in Range → CIDR mode. Ranges that do not start and end on block boundaries need several CIDR blocks; the tool lists the smallest set.

How many IPs are in a /24?

256 addresses, of which 254 are usable host addresses (the first is the network address and the last the broadcast address).

Does it work with IPv6?

Yes. CIDR to range, range to CIDR and listing all work with IPv6. Address lists are limited to 65,536 entries.

Share this tool

Free website test

Is your website set up right?

Check SSL, security headers, redirects, robots.txt, sitemap, llms.txt and security.txt in one test. It takes about 30 seconds.