Skip to content

How to Use IPv6 Range to CIDR

Convert a start and end IPv6 or IPv4 address into the smallest list of CIDR blocks that covers the range exactly, ready for firewalls and ACLs.

About this tool

Convert a start and end IPv6 address into the smallest list of CIDR blocks.

How to use IPv6 Range to CIDR

  1. Enter the first address of the range.
  2. Enter the last address of the range.
  3. Copy the list of CIDR blocks and the address count shown above it.

Worked example

The range 192.168.0.10 to 192.168.0.20 needs four blocks: 192.168.0.10/31, 192.168.0.12/30, 192.168.0.16/30 and 192.168.0.20/32.

Why can one range need several blocks?

A CIDR block must start on a boundary that matches its size, so ranges that do not line up are split into several blocks.

Does it work for IPv4?

Yes. If the start address is IPv4, the range is calculated as IPv4.

Put this guide into practice

  • IPv6 Range to CIDR — Convert a start and end IPv6 address into the smallest list of CIDR blocks.

Explore IP & Network Tools · More practical guides

Accessibility Menu

Personalize your experience. Open with Ctrl+U (Option+U on Mac). Preferences stay in this browser when storage is available.

Move / Hide Widget

Restore at any time with Ctrl+U (Option+U on Mac).

Accessibility statement and help