IP Lookup Tools IP Range → CIDR

Convert an IP range to CIDR blocks

Enter the first and last IP address of the range with a hyphen (192.168.1.10 - 192.168.1.200) and we list the fewest CIDR blocks that cover the range exactly. You need CIDR when writing a firewall rule, a cloud security group or an access list (ACL). If you enter a CIDR block we show its first and last address. IPv4 and IPv6 are supported.

Runs in your browser The addresses you enter are not sent to a server.

Example: 192.168.1.10 - 192.168.1.200 or 10.0.0.0/22. Both addresses must be the same version (both IPv4 or both IPv6).

Result: 192.168.1.10 - 192.168.1.200

Blocks: 8

Example calculation: 192.168.1.10 - 192.168.1.200. Enter your own range in the box above; the result here updates.

First address
192.168.1.10
Last address
192.168.1.200
Total address count
191
#CIDRFirst addressLast addressAddress count
1192.168.1.10/31192.168.1.10192.168.1.112
2192.168.1.12/30192.168.1.12192.168.1.154
3192.168.1.16/28192.168.1.16192.168.1.3116
4192.168.1.32/27192.168.1.32192.168.1.6332
5192.168.1.64/26192.168.1.64192.168.1.12764
6192.168.1.128/26192.168.1.128192.168.1.19164
7192.168.1.192/29192.168.1.192192.168.1.1998
8192.168.1.200/32192.168.1.200192.168.1.2001

What is calculated?

  • The fewest CIDR blocks that cover the range completely and without overlap
  • Each block's address count and a total check (the blocks add up to the number of addresses in the range)
  • The reverse direction: the first and last address of a single CIDR block
  • IPv4 and IPv6

How do I read the result?

  • A CIDR block starts at an address aligned to its own size. If the start or end of a range is not aligned, one block is not enough: 192.168.1.10 – 192.168.1.200 splits into eight blocks (/31, /30, /28, /27, /26, /26, /29, /32).
  • If a range starts and ends on a block boundary, you get a single block: 10.0.0.0 – 10.0.0.255 is 10.0.0.0/24.
  • In IPv4 a range can split into up to 62 blocks in the worst case; if you get many blocks, consider widening the range to aligned boundaries (this adds extra addresses to the coverage).

Frequently asked questions

Why did I get so many blocks?

A block must start at an address aligned to its own size; when a range starts and ends unaligned, the blocks first grow and then shrink. If your rule can accept extra addresses, widen the range and use a single block.

What if the first address is larger than the last?

No result is calculated; the page offers to swap the addresses.

Can I mix an IPv4 and an IPv6 address?

No. Both addresses must be the same version; otherwise an error is shown.