Skip to content
Takikit

IP Range to CIDR Converter

Convert an IP range from start to end into the fewest CIDR blocks, handy for writing firewall rules.

Loading tool...

Runs in your browser. Nothing is sent anywhere.

When to use it

Use this when an ISP or partner gives you an IP range as a start and end address, but your firewall, Nginx or cloud security group only accepts CIDR, for example when allowing a payment gateway's range.

A range that does not line up with block boundaries produces several lines; that is the smallest possible set of blocks, covering exactly the range with nothing extra. Only IPv4 is supported.

How to use

  1. Enter the first and last IP.
  2. The CIDR list appears right away.
  3. Click Copy or Download file.

Frequently asked questions

Is the data I paste sent to a server?

No. The tool runs in JavaScript right in your browser, and Takikit has no server that receives data. You can turn off your internet after opening the page and the tool will still work.

Related tools

More Developer tools

See all developer tools