← All tools
📐

CIDR / Subnet Calculator

Expand any CIDR block, or turn an IP range into the blocks you need for a whitelist.

Network
192.168.1.0
Broadcast
192.168.1.255
Netmask
255.255.255.0
Wildcard
0.0.0.255
First host
192.168.1.1
Last host
192.168.1.254
Usable hosts
254
Total addresses
256
Prefix
/24
Scope
Private (RFC 1918)
Canonical block:192.168.1.0/24

What CIDR notation means

A block like 192.168.1.0/24 is an address plus a prefix length. The prefix is how many leading bits are fixed as the network portion; the remaining bits are free to enumerate hosts. A /24 fixes 24 bits and leaves 8, which is 28 = 256 addresses. Every step down the prefix doubles the block: a /23 is 512 addresses, a /22 is 1,024.

For blocks of /30 and shorter, two addresses are not usable as hosts — the first is the network identifier and the last is the broadcast address. That is why a/24 gives 254 usable hosts rather than 256.

Turning an IP range into CIDR blocks

The IP range → CIDR mode solves the direction that actually comes up in practice. Someone tells you their crawlers run on 10.0.0.5 through 10.0.0.20, and an allow-list wants CIDR blocks. An arbitrary range rarely maps to one block, because every block must start on an address boundary that matches its own size. That range needs five:

  • 10.0.0.5/32 — a single address, since 5 is odd and starts nothing larger
  • 10.0.0.6/31 — covers .6 and .7
  • 10.0.0.8/29 — covers .8 through .15
  • 10.0.0.16/30 — covers .16 through .19
  • 10.0.0.20/32 — the last address on its own

The tool always returns the minimal set: at each step it takes the largest block that is both aligned to the current address and small enough to stay inside the range.

Using this for proxy IP whitelisting

If you authenticate to your proxies by IP whitelist rather than username and password, you are describing which source addresses are allowed to connect. When your crawlers run on a contiguous block of servers, converting that range to CIDR gives you the exact entries to add — without widening the allow-list to a rounder, larger block that also admits addresses you do not control.

Widening is the common mistake. Rounding 10.0.0.5–10.0.0.20 up to10.0.0.0/24 is one tidy line instead of five, but it authorises 256 addresses to use your proxies instead of 16. On a shared host or a cloud subnet, those other addresses are not necessarily yours.

Scope warnings

The calculator labels blocks that fall in special-use ranges — RFC 1918 private space (10/8, 172.16/12, 192.168/16), carrier-grade NAT (100.64/10), loopback, link-local, and the documentation ranges. These are worth catching before they ship: a whitelist entry pointing at a private range will never match the public address your traffic actually arrives from, which is a common reason a freshly configured proxy appears to reject a customer.

Privacy

Every calculation runs in your browser. Nothing you type is sent to our servers, logged, or included in analytics — the page makes no network request when you use it.

Need Proxies?

Dedicated and shared datacenter proxies across the USA, Spain, and Italy. Instant activation.