DNS Checker.eu

IPv6 Range to CIDR

Convert a start-and-end IPv6 address range into the minimal set of CIDR prefixes that covers it exactly, with no addresses added or left out.

IPv6 range to CIDR blocks

Give a start and end address and get the minimal list of CIDR blocks that covers the range exactly. All math runs locally with BigInt.

About IPv6 Range to CIDR

A raw IPv6 range - a start address and an end address - often cannot be written as a single CIDR block, because CIDR blocks must be power-of-two sized and aligned to their own boundary. This tool takes any start and end you give it and returns the shortest possible list of CIDR prefixes whose union is exactly the range: every address in the range is covered, and no address outside it is included.

The result is built with a greedy algorithm. Starting at the low end of the range, it picks the largest block that both aligns to the current position and still fits inside what remains, records that prefix, then advances to the next uncovered address and repeats. This produces the canonical minimal decomposition - the same set a router or address-management tool would compute internally when summarizing a range.

How many blocks you get depends on the shape of the range. A range that happens to be aligned and power-of-two sized collapses to one CIDR; an arbitrary range typically breaks into several, and the tool lists them all with a one-click copy for the whole set. It reports the block count and validates that the start address is not greater than the end before computing anything.

All parsing and arithmetic happen locally in your browser with 128-bit BigInt math, so the addresses you enter are never uploaded. The tool is part of a self-hosted, European, tracker-free toolkit, which makes it suitable for summarizing ranges from private or pre-production address space.

How to use it

  1. 1Enter the first address of your range in the start field, for example 2001:db8::.
  2. 2Enter the last address in the end field, for example 2001:db8::ffff.
  3. 3The tool checks that both are valid IPv6 addresses and that the start is not higher than the end.
  4. 4Read the minimal list of covering CIDR blocks, along with the total block count.
  5. 5Use the copy button to grab the whole list at once for a route table, firewall object, or config file.

Common use cases

  • -Summarizing an arbitrary IPv6 address range into route or firewall entries.
  • -Turning a start-end pair from a spreadsheet or ticket into aggregatable CIDR prefixes.
  • -Checking whether a range can be expressed as a single clean prefix or needs several.
  • -Preparing prefix lists for BGP filters or access-control objects that only accept CIDR.
  • -Cross-checking a router's own range-to-CIDR summarization against a known-good result.

Frequently asked questions

How do I convert an IPv6 range to CIDR?
Enter the range's first and last address, for example 2001:db8:: to 2001:db8::ffff. The tool returns the minimal list of CIDR prefixes that together cover exactly that range, which for this example is a single /112.
Why does one range produce several CIDR blocks?
A CIDR block must be a power of two in size and aligned to its own boundary. When a range's start, end, or length does not fit a single aligned power-of-two block, it has to be split into multiple prefixes to cover it precisely.
Does the result include addresses outside my range?
No. The output is an exact cover: the union of the returned CIDR blocks equals your range with nothing added and nothing missing. That is what makes it safe to use directly in routing or filtering rules.
Can any IPv6 range be written as one CIDR?
Only when the range is aligned to a prefix boundary and its length is a power of two. For example a /64's full span is one CIDR, but a range that starts mid-block or has an odd length will decompose into two or more prefixes.
What is the minimal set of CIDR blocks?
It is the smallest number of prefixes whose union exactly equals the range. This tool computes it with a greedy alignment algorithm, choosing the largest fitting aligned block at each step, which yields the canonical minimal decomposition.
Are the addresses I enter uploaded anywhere?
No. Both parsing and the range-to-CIDR math run in your browser with 128-bit BigInt arithmetic, so the start and end addresses stay on your device and are never sent to a server.