By Debmedia Technologies LLP · Kolkata, India · Updated
What Is IPv6 Range to CIDR Conversion?
IPv6 range to CIDR conversion finds the shortest list of CIDR prefixes that exactly covers a range between two IPv6 addresses. Registries, hosting panels and some databases give you a start and an end address, but routers and firewalls want prefixes. This tool does the translation.
A range that lines up with a prefix boundary needs only one block. Most real ranges do not, so the answer is usually a short list of blocks of different sizes.
How to Use This IPv6 Range to CIDR Converter
- Enter the first address of the range, for example 2001:db8::.
- Enter the last address, for example 2001:db8::ffff.
- Press Convert.
- Copy the CIDR blocks from the table into your firewall or routing configuration.
A Worked Example
The range 2001:db8::1 to 2001:db8::6 cannot be a single block, because it does not start on a boundary. It needs these blocks:
| Block | Covers |
|---|---|
| 2001:db8::1/128 | 2001:db8::1 only |
| 2001:db8::2/127 | 2001:db8::2 to 2001:db8::3 |
| 2001:db8::4/127 | 2001:db8::4 to 2001:db8::5 |
| 2001:db8::6/128 | 2001:db8::6 only |
The rules of aggregation come from CIDR, described in RFC 4632, which describes CIDR aggregation.
How the Tool Finds the Smallest List
- It starts at the first address and finds the largest block that begins exactly there.
- It shrinks the block until it fits inside the remaining range.
- It adds the block to the list, moves to the next address and repeats.
- It stops when the end address is covered, or after 200 blocks.
Choosing the largest fitting block each time always gives the fewest prefixes, so you never get a longer list than necessary.
Tips
- Check that the start address is lower than the end address.
- Use the full address if you are unsure. The IPv6 expander shows every group.
- Verify any block with the CIDR to range converter to see its first and last address again.
- For IPv4 blocks, use the IPv4 subnet calculator.
Everything runs in your browser. Nothing you enter is sent to our server.
Where This Conversion Is Needed
Registries and hosting panels often publish ranges, while routers, cloud security groups and firewalls want prefixes. Converting by hand means binary maths on 128-bit values, which is slow and easy to get wrong. This tool does it in a blink and keeps the list as short as possible, so your rule sets stay small and easy to audit.
It is also useful when you merge ranges from several sources. Convert each one, then check the blocks with the prefix calculator to see exactly which addresses they cover.
Very large ranges are no problem, because the tool uses exact big-integer maths and never rounds.
Frequently Asked Questions
Disclaimer: results come from live requests and can change as records and servers change. We cannot guarantee that every answer matches what every visitor sees.