Helpnyx

CIDR and range converter

Firewalls, route filters and old spreadsheets often list addresses as ranges. Turn any first-to-last range into the smallest exact set of CIDR blocks, or turn blocks back into ranges. Works for IPv4 and IPv6.

Runs in your browser. Nothing you enter or upload is sent to us.

Try:

How to use it

Three steps

  1. Choose a direction. Range to CIDR turns first - last ranges into blocks. CIDR to range lists the first and last address of each block.
  2. Enter one per line. For ranges, write the first and last address with a dash between them. You can paste many lines at once.
  3. Copy the result. Copy every block or range in one go, ready for a firewall or router config.

Questions

Good to know

Why does one range become several blocks?

A CIDR block always starts on a multiple of its size and covers a power of two addresses. A range such as 10.0.0.1 - 10.0.0.254 doesn't line up, so it takes several blocks to cover exactly.

Is the list of blocks the shortest possible?

Yes. The converter uses the largest block that fits at each step, which gives the fewest blocks that cover exactly the range and nothing else.

Does it work for IPv6?

Yes. Both ends of a range must be the same version.

Can I merge many blocks into fewer?

Use the supernet and summarize tool. It merges overlapping and neighbouring blocks into the shortest list.

More free tools

Other tools you may need

Still tracking IPs in a spreadsheet?

IPAM Enterprise keeps every /24, block, customer and circuit in one portal, and checks each assignment for overlaps before it is saved.