CIDR to IP Range Converter

Turn a CIDR block such as 192.168.0.0/22 into its first and last IP address and total address count, or take a start and end address and get the smallest set of CIDR blocks that cover it. Free, instant and private in your browser.

Read the guide: What Is CIDR Notation?
Address range
192.168.0.0192.168.3.255
1,024 addresses · /22
First IP
192.168.0.0
Last IP
192.168.3.255
Total addresses
1,024
Prefix
/22
Covered by 10 CIDR blocks.
CIDR blocks
192.168.1.5/32
192.168.1.6/31
192.168.1.8/29
192.168.1.16/28
192.168.1.32/27
192.168.1.64/26
192.168.1.128/25
192.168.2.0/28
192.168.2.16/30
192.168.2.20/32

How it works

  1. 1

    Enter a CIDR block

    Type a CIDR such as 192.168.0.0/22. The converter snaps any host address to its network and shows the first IP, last IP and total count.

  2. 2

    Or enter a start and end IP

    Fill in the start and end addresses of a range and the converter lists the aligned CIDR blocks that cover it exactly.

  3. 3

    Copy the result

    Copy the IP range or the CIDR block list straight into a firewall rule, route table or allowlist.

Instant & 100% private — nothing is uploaded

Everything runs locally in your browser. Your code, text and files are processed on your own device and are never sent to a server — so there are no upload waits, no size limits from us, and nothing is ever stored or logged.

Frequently asked questions

How do I find the first and last IP of a CIDR block?
The first IP is the network address, where every host bit is 0, and the last IP is the broadcast address, where every host bit is 1. For 192.168.0.0/22 the first IP is 192.168.0.0 and the last is 192.168.3.255, for 1024 addresses in total. The converter works this out for any prefix from /0 to /32.
How many addresses does a CIDR block hold?
Take 32 minus the prefix to get the number of host bits, then raise 2 to that power. A /24 has 8 host bits, so 256 addresses. A /22 has 10 host bits, so 1024. This is the total address count, including the network and broadcast addresses.
Why does one IP range turn into several CIDR blocks?
A CIDR block always starts on an aligned boundary and has a power-of-two size. An arbitrary range, say 192.168.1.5 to 192.168.2.20, rarely lines up with a single block, so it is covered by the smallest set of aligned blocks instead. The converter picks the largest block that fits at each step, which gives the shortest list.
Is my data sent to a server?
No. The conversion runs entirely in your browser, so the addresses you enter never leave your device. That keeps internal ranges private and means the tool keeps working once the page has loaded.