IP Range to CIDR Converter

Turn a start and end IP into the smallest set of CIDR blocks, or expand a CIDR back to its first and last address — all in your browser.

The IP Range to CIDR Converter runs entirely in your browser. The start and end addresses, CIDR blocks, and ranges you enter are processed on your device and never uploaded to ArrayKit.

Open the CIDR / Subnet Calculator

About IP Range to CIDR

The IP Range to CIDR Converter takes a start and end address and returns the minimal set of aligned CIDR blocks that cover the range exactly — no more, no less. It uses a greedy largest-block algorithm, so a tidy range like 192.168.1.0 to 192.168.1.255 collapses to a single 192.168.1.0/24, while an off-boundary range splits into the fewest blocks that still add up to the exact address count. Flip to reverse mode to expand any CIDR back into its network, first IP, last IP, and total address count. Both IPv4 and IPv6 are supported, with big-integer math so even a /32 IPv6 prefix reports its full 2^96 count. It is built for network engineers writing firewall rules, ACLs, route tables, and allowlists, and everything runs on your device so your topology never leaves the browser.

Features

How to use the IP Range to CIDR

  1. Keep the Range → CIDR tab selected
  2. Enter the start and end IP address (both IPv4 or both IPv6)
  3. Read the aggregated CIDR blocks and copy them with one click
  4. Switch to CIDR → Range to expand a block into its first and last IP

Example

Input

start: 192.168.1.0
end:   192.168.2.10

Output

192.168.1.0/24
192.168.2.0/29
192.168.2.8/31
192.168.2.10/32

An off-boundary range splits into the fewest blocks that cover it exactly.

Common errors & troubleshooting

Frequently asked questions

How does the converter pick which CIDR blocks to output?
It walks the range from the start address and, at each step, emits the largest block that is both aligned to the current address and fits inside the remaining range. Repeating that greedily yields the minimal set of CIDR blocks that cover the range exactly.
Why does my range turn into several CIDR blocks instead of one?
A single CIDR block always contains a power-of-two number of addresses aligned to its own boundary. Unless your start and end line up on those boundaries, no one block can cover the range, so it is split into the fewest blocks whose sizes add up to the exact count.
Does it handle IPv6 ranges and huge prefixes?
Yes. IPv6 addresses are parsed into 128-bit big integers, so the same aggregation works for v6 and the reverse mode can report enormous counts — a /32 IPv6 block, for example, contains 2^96 addresses.
What does CIDR → Range mode return?
Paste a block like 10.0.0.0/24 or 2001:db8::/32 and it shows the network address, the first IP, the last IP, and the total number of addresses in the block, masking any host bits to the network boundary first.
Can I paste an IP that is not the network address of the block?
Yes. In CIDR → Range mode the host bits are masked off automatically, so 192.168.1.200/24 and 192.168.1.0/24 both resolve to the same network, first IP, and last IP.
Are my IP addresses sent to a server?
No. The IP Range to CIDR Converter runs entirely in your browser. The addresses and ranges you enter are computed on your device and are never uploaded to ArrayKit.

Related tools

All ArrayKit tools