CIDR to IP Range (and Back)

Two-way converter: CIDR → IP range, and IP range → minimum set of CIDRs that cover it. Useful for firewall rules, AWS security groups, NACLs that take either format.

How to use the CIDR to IP Range (and Back)

Switch modes. CIDR → Range takes a block like 10.0.0.0/24 and shows its first and last IP. Range → CIDR takes a start and end IP and returns the minimum set of CIDR blocks that exactly cover it.

CIDR blocks and IP ranges, both directions

CIDR notation packs a starting address and a prefix length into one string like 10.0.0.0/24, which is compact but hides the actual first and last address of the block. Plenty of systems — firewalls, AWS security groups, NACLs, allowlists — accept one format but not the other, so you constantly need to translate between a CIDR and an explicit start–end range.

This converts both directions. CIDR to range is straightforward; the harder direction is range to CIDR, because an arbitrary range rarely lines up with a single block and has to be decomposed into several aligned CIDRs. For the full breakdown of one block — network address, broadcast, usable hosts, mask — use the IPv4 subnet calculator; to validate or classify a single address, the IP address tools.

Common use cases

  • Firewall rules — convert a CIDR to the explicit range a device expects.
  • AWS security groups — translate between range and CIDR for ingress rules.
  • Allowlists — turn a start–end range into the minimum CIDR set.
  • Route summarisation — collapse a range into as few blocks as possible.
  • Documentation — show both notations for an address block.

Frequently asked questions

What is CIDR notation?

A network address plus a prefix length, like 10.0.0.0/24, where the number after the slash is how many leading bits are fixed as the network part.

Why does a range convert to several CIDRs?

CIDR blocks must start on an aligned boundary and have a power-of-two size, so an arbitrary range is covered by the smallest set of aligned blocks rather than one.

Does it show usable host counts?

For network, broadcast, and usable host details of a single block, use the IPv4 subnet calculator.

Does it handle IPv6?

This tool focuses on IPv4 ranges; for IPv6 parsing and expansion, see the IP address tools.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: