LazyTools

🔒 Every tool runs in your browser, the files and values you enter are never uploaded to any server. How it works

↔️ CIDR to IP Range Converter

Turn 192.168.0.0/22 into its first, last address range, or turn an arbitrary range into the smallest set of CIDR blocks that covers it exactly.

Range192.168.0.0, 192.168.3.255
First address192.168.0.0
Last address192.168.3.255
Total addresses1,024
Usable hosts1,022
Subnet mask255.255.252.0

Both conversions run locally, nothing you enter is uploaded.

Rate this tool:
Anonymous, no account, no identifier

How the cidr to ip range converter works

CIDR notation and first, last ranges are two ways of writing the same thing, and different systems demand different forms: firewall rules and cloud security groups usually want CIDR, IPAM spreadsheets and WHOIS output often use ranges. CIDR-to-range is a simple mask expansion. The reverse is trickier: an arbitrary range rarely fits one CIDR block, so the tool computes the minimal covering set, repeatedly taking the largest power-of-two block that is aligned at the range start and still fits. For example 10.0.0.5-10.0.0.20 needs five blocks (/32, /31, /29, /30, /32), which is why hand-converting ranges to firewall rules goes wrong so often.

A range that starts and ends on "round" addresses is not necessarily one CIDR block, 10.0.1.0-10.0.2.255 looks tidy but is two blocks (10.0.1.0/24 and 10.0.2.0/24), because a single /23 must start on an even third octet. Alignment, not size, decides.

Frequently asked questions

How do I read 192.168.0.0/22 as a range?

/22 leaves 10 host bits, i.e. 1,024 addresses: 192.168.0.0 through 192.168.3.255. The calculator shows the range plus usable host count instantly.

Why does my range need multiple CIDR blocks?

A CIDR block must be a power-of-two size AND start at a multiple of its size. Any range that violates either rule splits into several blocks, the tool finds the provably minimal set.

Can I convert a range for AWS/Azure security groups?

Yes, paste the start and end address and copy out the CIDR list; cloud security rules accept only CIDR notation, one block per rule.

Does it handle single addresses?

Yes, a single address is a /32 in CIDR form, and any range where start equals end converts to exactly that.

Related network tools

From the blog