UTILS.
Private by default
↔

CIDR to IP Range

Convert CIDR notation to a first/last IP range, or an IP range to covering CIDR blocks.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
— output appears here —

About this tool

Two IPv4 helpers in one page: turn a CIDR block into its first and last address, or collapse a start-to-end IP range into the smallest list of CIDR blocks that covers it exactly. Everything is calculated in your browser.

In CIDR mode, type something like 10.0.0.0/22 and you get the first address, the last address and the total number of addresses. The address you type does not have to be the network address: bits beyond the prefix are masked off, so 10.0.0.77/22 gives the same block as 10.0.0.0/22. The first and last values are the network and broadcast addresses, and the total includes them, so it is not a count of usable hosts. Prefixes from /0 to /32 are accepted.

In range mode, enter a start and end address. An arbitrary range seldom lines up with one power-of-two block, so the result is a list with one aligned CIDR per line. If the end is lower than the start, the two are swapped for you.

Only IPv4 in dotted-decimal form is supported; IPv6, netmask notation and leading-zero shortcuts are reported as invalid. Nothing is sent anywhere.

Frequently asked questions

Why does a range produce several CIDRs?
A CIDR block must start on an address that is a multiple of its size. A range that does not fit one such block is split into the fewest aligned blocks that cover it exactly.
Is the total the number of usable hosts?
No. It counts every address in the block, including the network and broadcast addresses. Subtract two for typical usable hosts in a normal subnet.
Does the order of start and end matter?
No. If the end is lower than the start, they are swapped before the covering blocks are computed.
Can I use IPv6?
No. Both modes accept IPv4 dotted-decimal addresses only. Use the IPv6 expander for IPv6 notation.

More tools