IP Range to CIDR Converter

Enter the first and last IPv4 address to get the shortest list of CIDR blocks that covers exactly that range.

Use the tool

Loading the tool…

About IP Range to CIDR Converter

Convert a range of IP addresses, from a first address to a last address, into CIDR blocks. Network tools and firewalls use these blocks to describe address ranges.

Worked example

Enter `192.168.1.10` as the first address and `192.168.1.200` as the last. The tool returns the CIDR blocks that cover exactly that range.

Limits

Leave the last address empty to convert a single address. The result covers only the range you enter.

How to use IP Range to CIDR Converter

  1. Enter the first address.
  2. Enter the last address.
  3. Copy the list of blocks.

Good to know

  • The list covers the range exactly, with nothing extra.
  • Leave the last address empty for a single address.
  • Leading zeros in numbers are refused, since programs read them differently.
  • Only IPv4 is supported.

Frequently asked questions

What is CIDR?

A way to write a block of addresses as an address and a prefix length, such as 192.168.1.0/24.

Why are there several blocks?

A range that does not line up with powers of two needs more than one block to be covered exactly.