IP range to CIDR converter

Turn start and end addresses into the minimal set of CIDR blocks, or paste a long CIDR list and merge it into the fewest possible blocks.

Private: works in your browser, nothing is uploaded.

How to use the IP Range to CIDR tool

  1. Choose a mode: ranges to CIDR, or merge a CIDR list.
  2. Paste your ranges (start - end) or CIDR blocks, one per line.
  3. Click “Convert” and copy the result.

Why a range often needs several blocks

A CIDR block must start on a boundary that matches its size: a /26 (64 addresses) has to start at .0, .64, .128 or .192. An arbitrary range such as 192.168.1.10 to 192.168.1.73 does not line up, so it has to be covered by several blocks of different sizes: /31, /30, /29, /27 and so on. The converter finds the smallest such set, which is exactly what firewalls and access lists that only accept CIDR need.

Merging and route summarisation

In merge mode the tool sorts your blocks, joins overlapping and adjacent ones, and rewrites the result as the fewest CIDR blocks. 10.1.0.0/24, 10.1.1.0/24 and 10.1.2.0/23 become a single 10.1.0.0/22.

  • Shorter routing tables: advertise one summary route instead of dozens of small ones.
  • Cleaner firewall rules and cloud security groups, which often have a limit on the number of entries.
  • Deduplicated block lists: country or threat-intelligence lists often contain overlapping entries.

From experience: always check the merged result before applying it as a route summary. A summary can cover addresses you do not own, and traffic for those will then be routed to you and dropped.

Privacy

Everything runs in your browser. Nothing you type is sent to our server or stored.

Frequently asked questions

Does the order of the start and end address matter?

No. If the end address is lower than the start, they are swapped.

Can I mix IPv4 and IPv6?

Yes, line by line. In merge mode IPv4 and IPv6 blocks are merged separately.

Is the result the smallest possible list?

Yes. The algorithm always takes the largest aligned block that fits, which gives the minimal number of CIDR blocks.

What separators can I use for a range?

A hyphen, an en dash, a comma or a space between the two addresses.