← All text tools

IP Range to CIDR Converter

Convert a first and last IP address into the smallest list of CIDR blocks that covers the range exactly, with size and netmask of every block.

  • Free
  • No sign-up
  • Works on any device

About IP Range to CIDR Converter

Some tools give you an address range such as 192.168.1.10 to 192.168.1.200, but firewalls and routing tables want CIDR blocks. A CIDR block must start on a boundary that matches its size, so a range that does not line up needs several blocks. This converter walks through the range and always takes the largest block that fits, which gives the smallest exact list. The example range needs eight blocks, from a /31 up to a /26, covering 191 addresses with nothing extra.

How to use IP Range to CIDR Converter

  1. Enter the first address of the range.
  2. Enter the last address of the range.
  3. Copy the list of CIDR blocks, or read the table with the first, last and size of each block.

Why use this tool?

Also known as

Frequently asked questions

Why not one block that is a little bigger than my range?

A larger block would include addresses outside your range, which could open access you did not intend. This tool gives an exact cover, with no extra and no missing address.

Does it work for IPv6 ranges?

Yes. Both addresses must be the same version, and the output shows the prefix lengths. The netmask column is only filled for IPv4.

What if I enter the end before the start?

The two addresses are swapped automatically and a note tells you so, instead of showing an error.

Is IP Range to CIDR Converter free?

Yes. IP Range to CIDR Converter on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Related tools