Skip to content
LookupOwl

IPv6 range to CIDR converter

Get the shortest exact list of CIDR prefixes for an IPv6 start and end address, the way a registry or firewall writes it.

IPv6 only, one range per line, like 2001:db8::1 - 2001:db8::ff.

Results for 2620:0:2d0:200::7-2620:0:2d0:2df::7

Converted just now

JSON

76 blocks

2620:0:2d0:200::7/128 + 2620:0:2d0:200::8/125 + 74 more

That range doesn’t line up with a single CIDR block, so it takes 76. Together they cover exactly what you asked for — nothing more.

Results (76, one per line)

2620:0:2d0:200::7/128
2620:0:2d0:200::8/125
2620:0:2d0:200::10/124
2620:0:2d0:200::20/123
2620:0:2d0:200::40/122
2620:0:2d0:200::80/121
2620:0:2d0:200::100/120
2620:0:2d0:200::200/119
2620:0:2d0:200::400/118
2620:0:2d0:200::800/117
2620:0:2d0:200::1000/116
2620:0:2d0:200::2000/115
2620:0:2d0:200::4000/114
2620:0:2d0:200::8000/113
2620:0:2d0:200::1:0/112
2620:0:2d0:200::2:0/111
2620:0:2d0:200::4:0/110
2620:0:2d0:200::8:0/109
2620:0:2d0:200::10:0/108
2620:0:2d0:200::20:0/107
2620:0:2d0:200::40:0/106
2620:0:2d0:200::80:0/105
2620:0:2d0:200::100:0/104
2620:0:2d0:200::200:0/103
2620:0:2d0:200::400:0/102
2620:0:2d0:200::800:0/101
2620:0:2d0:200::1000:0/100
2620:0:2d0:200::2000:0/99
2620:0:2d0:200::4000:0/98
2620:0:2d0:200::8000:0/97
2620:0:2d0:200:0:1::/96
2620:0:2d0:200:0:2::/95
2620:0:2d0:200:0:4::/94
2620:0:2d0:200:0:8::/93
2620:0:2d0:200:0:10::/92
2620:0:2d0:200:0:20::/91
2620:0:2d0:200:0:40::/90
2620:0:2d0:200:0:80::/89
2620:0:2d0:200:0:100::/88
2620:0:2d0:200:0:200::/87
2620:0:2d0:200:0:400::/86
2620:0:2d0:200:0:800::/85
2620:0:2d0:200:0:1000::/84
2620:0:2d0:200:0:2000::/83
2620:0:2d0:200:0:4000::/82
2620:0:2d0:200:0:8000::/81
2620:0:2d0:200:1::/80
2620:0:2d0:200:2::/79
2620:0:2d0:200:4::/78
2620:0:2d0:200:8::/77
2620:0:2d0:200:10::/76
2620:0:2d0:200:20::/75
2620:0:2d0:200:40::/74
2620:0:2d0:200:80::/73
2620:0:2d0:200:100::/72
2620:0:2d0:200:200::/71
2620:0:2d0:200:400::/70
2620:0:2d0:200:800::/69
2620:0:2d0:200:1000::/68
2620:0:2d0:200:2000::/67
2620:0:2d0:200:4000::/66
2620:0:2d0:200:8000::/65
2620:0:2d0:201::/64
2620:0:2d0:202::/63
2620:0:2d0:204::/62
2620:0:2d0:208::/61
2620:0:2d0:210::/60
2620:0:2d0:220::/59
2620:0:2d0:240::/58
2620:0:2d0:280::/58
2620:0:2d0:2c0::/60
2620:0:2d0:2d0::/61
2620:0:2d0:2d8::/62
2620:0:2d0:2dc::/63
2620:0:2d0:2de::/64
2620:0:2d0:2df::/125
Addresses
4,113,623,928,437,230,010,369

Exactly 4,113,623,928,437,230,010,369

  • This range needs 76 CIDR blocks. A single block (2620:0:2d0:200::/56) would also include 608742554432415203327 addresses outside your range; use the exact list for firewall rules.
  • The smallest single block that holds this range is 2620:0:2d0:200::/56, but it would also include 608,742,554,432,415,203,327 addresses you did not ask for.
Blocks76
BlockFirstLastAddresses
2620:0:2d0:200::7/1282620:0:2d0:200::72620:0:2d0:200::71
2620:0:2d0:200::8/1252620:0:2d0:200::82620:0:2d0:200::f8
2620:0:2d0:200::10/1242620:0:2d0:200::102620:0:2d0:200::1f16
2620:0:2d0:200::20/1232620:0:2d0:200::202620:0:2d0:200::3f32
2620:0:2d0:200::40/1222620:0:2d0:200::402620:0:2d0:200::7f64
2620:0:2d0:200::80/1212620:0:2d0:200::802620:0:2d0:200::ff128
2620:0:2d0:200::100/1202620:0:2d0:200::1002620:0:2d0:200::1ff256
2620:0:2d0:200::200/1192620:0:2d0:200::2002620:0:2d0:200::3ff512
2620:0:2d0:200::400/1182620:0:2d0:200::4002620:0:2d0:200::7ff1,024
2620:0:2d0:200::800/1172620:0:2d0:200::8002620:0:2d0:200::fff2,048
2620:0:2d0:200::1000/1162620:0:2d0:200::10002620:0:2d0:200::1fff4,096
2620:0:2d0:200::2000/1152620:0:2d0:200::20002620:0:2d0:200::3fff8,192
2620:0:2d0:200::4000/1142620:0:2d0:200::40002620:0:2d0:200::7fff16,384
2620:0:2d0:200::8000/1132620:0:2d0:200::80002620:0:2d0:200::ffff32,768
2620:0:2d0:200::1:0/1122620:0:2d0:200::1:02620:0:2d0:200::1:ffff65,536
2620:0:2d0:200::2:0/1112620:0:2d0:200::2:02620:0:2d0:200::3:ffff131,072
2620:0:2d0:200::4:0/1102620:0:2d0:200::4:02620:0:2d0:200::7:ffff262,144
2620:0:2d0:200::8:0/1092620:0:2d0:200::8:02620:0:2d0:200::f:ffff524,288
2620:0:2d0:200::10:0/1082620:0:2d0:200::10:02620:0:2d0:200::1f:ffff1,048,576
2620:0:2d0:200::20:0/1072620:0:2d0:200::20:02620:0:2d0:200::3f:ffff2,097,152
2620:0:2d0:200::40:0/1062620:0:2d0:200::40:02620:0:2d0:200::7f:ffff4,194,304
2620:0:2d0:200::80:0/1052620:0:2d0:200::80:02620:0:2d0:200::ff:ffff8,388,608
2620:0:2d0:200::100:0/1042620:0:2d0:200::100:02620:0:2d0:200::1ff:ffff16,777,216
2620:0:2d0:200::200:0/1032620:0:2d0:200::200:02620:0:2d0:200::3ff:ffff33,554,432
2620:0:2d0:200::400:0/1022620:0:2d0:200::400:02620:0:2d0:200::7ff:ffff67,108,864
2620:0:2d0:200::800:0/1012620:0:2d0:200::800:02620:0:2d0:200::fff:ffff134,217,728
2620:0:2d0:200::1000:0/1002620:0:2d0:200::1000:02620:0:2d0:200::1fff:ffff268,435,456
2620:0:2d0:200::2000:0/992620:0:2d0:200::2000:02620:0:2d0:200::3fff:ffff536,870,912
2620:0:2d0:200::4000:0/982620:0:2d0:200::4000:02620:0:2d0:200::7fff:ffff1,073,741,824
2620:0:2d0:200::8000:0/972620:0:2d0:200::8000:02620:0:2d0:200::ffff:ffff2,147,483,648
2620:0:2d0:200:0:1::/962620:0:2d0:200:0:1::2620:0:2d0:200:0:1:ffff:ffff4,294,967,296
2620:0:2d0:200:0:2::/952620:0:2d0:200:0:2::2620:0:2d0:200:0:3:ffff:ffff8,589,934,592
2620:0:2d0:200:0:4::/942620:0:2d0:200:0:4::2620:0:2d0:200:0:7:ffff:ffff17,179,869,184
2620:0:2d0:200:0:8::/932620:0:2d0:200:0:8::2620:0:2d0:200:0:f:ffff:ffff34,359,738,368
2620:0:2d0:200:0:10::/922620:0:2d0:200:0:10::2620:0:2d0:200:0:1f:ffff:ffff68,719,476,736
2620:0:2d0:200:0:20::/912620:0:2d0:200:0:20::2620:0:2d0:200:0:3f:ffff:ffff137,438,953,472
2620:0:2d0:200:0:40::/902620:0:2d0:200:0:40::2620:0:2d0:200:0:7f:ffff:ffff274,877,906,944
2620:0:2d0:200:0:80::/892620:0:2d0:200:0:80::2620:0:2d0:200:0:ff:ffff:ffff549,755,813,888
2620:0:2d0:200:0:100::/882620:0:2d0:200:0:100::2620:0:2d0:200:0:1ff:ffff:ffff1,099,511,627,776
2620:0:2d0:200:0:200::/872620:0:2d0:200:0:200::2620:0:2d0:200:0:3ff:ffff:ffff2,199,023,255,552
2620:0:2d0:200:0:400::/862620:0:2d0:200:0:400::2620:0:2d0:200:0:7ff:ffff:ffff4,398,046,511,104
2620:0:2d0:200:0:800::/852620:0:2d0:200:0:800::2620:0:2d0:200:0:fff:ffff:ffff8,796,093,022,208
2620:0:2d0:200:0:1000::/842620:0:2d0:200:0:1000::2620:0:2d0:200:0:1fff:ffff:ffff17,592,186,044,416
2620:0:2d0:200:0:2000::/832620:0:2d0:200:0:2000::2620:0:2d0:200:0:3fff:ffff:ffff35,184,372,088,832
2620:0:2d0:200:0:4000::/822620:0:2d0:200:0:4000::2620:0:2d0:200:0:7fff:ffff:ffff70,368,744,177,664
2620:0:2d0:200:0:8000::/812620:0:2d0:200:0:8000::2620:0:2d0:200:0:ffff:ffff:ffff140,737,488,355,328
2620:0:2d0:200:1::/802620:0:2d0:200:1::2620:0:2d0:200:1:ffff:ffff:ffff281,474,976,710,656
2620:0:2d0:200:2::/792620:0:2d0:200:2::2620:0:2d0:200:3:ffff:ffff:ffff562,949,953,421,312
2620:0:2d0:200:4::/782620:0:2d0:200:4::2620:0:2d0:200:7:ffff:ffff:ffff1,125,899,906,842,624
2620:0:2d0:200:8::/772620:0:2d0:200:8::2620:0:2d0:200:f:ffff:ffff:ffff2^51
2620:0:2d0:200:10::/762620:0:2d0:200:10::2620:0:2d0:200:1f:ffff:ffff:ffff2^52
2620:0:2d0:200:20::/752620:0:2d0:200:20::2620:0:2d0:200:3f:ffff:ffff:ffff2^53
2620:0:2d0:200:40::/742620:0:2d0:200:40::2620:0:2d0:200:7f:ffff:ffff:ffff2^54
2620:0:2d0:200:80::/732620:0:2d0:200:80::2620:0:2d0:200:ff:ffff:ffff:ffff2^55
2620:0:2d0:200:100::/722620:0:2d0:200:100::2620:0:2d0:200:1ff:ffff:ffff:ffff2^56
2620:0:2d0:200:200::/712620:0:2d0:200:200::2620:0:2d0:200:3ff:ffff:ffff:ffff2^57
2620:0:2d0:200:400::/702620:0:2d0:200:400::2620:0:2d0:200:7ff:ffff:ffff:ffff2^58
2620:0:2d0:200:800::/692620:0:2d0:200:800::2620:0:2d0:200:fff:ffff:ffff:ffff2^59
2620:0:2d0:200:1000::/682620:0:2d0:200:1000::2620:0:2d0:200:1fff:ffff:ffff:ffff2^60
2620:0:2d0:200:2000::/672620:0:2d0:200:2000::2620:0:2d0:200:3fff:ffff:ffff:ffff2^61
2620:0:2d0:200:4000::/662620:0:2d0:200:4000::2620:0:2d0:200:7fff:ffff:ffff:ffff2^62
2620:0:2d0:200:8000::/652620:0:2d0:200:8000::2620:0:2d0:200:ffff:ffff:ffff:ffff2^63
2620:0:2d0:201::/642620:0:2d0:201::2620:0:2d0:201:ffff:ffff:ffff:ffff2^64
2620:0:2d0:202::/632620:0:2d0:202::2620:0:2d0:203:ffff:ffff:ffff:ffff2^65
2620:0:2d0:204::/622620:0:2d0:204::2620:0:2d0:207:ffff:ffff:ffff:ffff2^66
2620:0:2d0:208::/612620:0:2d0:208::2620:0:2d0:20f:ffff:ffff:ffff:ffff2^67
2620:0:2d0:210::/602620:0:2d0:210::2620:0:2d0:21f:ffff:ffff:ffff:ffff2^68
2620:0:2d0:220::/592620:0:2d0:220::2620:0:2d0:23f:ffff:ffff:ffff:ffff2^69
2620:0:2d0:240::/582620:0:2d0:240::2620:0:2d0:27f:ffff:ffff:ffff:ffff2^70
2620:0:2d0:280::/582620:0:2d0:280::2620:0:2d0:2bf:ffff:ffff:ffff:ffff2^70
2620:0:2d0:2c0::/602620:0:2d0:2c0::2620:0:2d0:2cf:ffff:ffff:ffff:ffff2^68
2620:0:2d0:2d0::/612620:0:2d0:2d0::2620:0:2d0:2d7:ffff:ffff:ffff:ffff2^67
2620:0:2d0:2d8::/622620:0:2d0:2d8::2620:0:2d0:2db:ffff:ffff:ffff:ffff2^66
2620:0:2d0:2dc::/632620:0:2d0:2dc::2620:0:2d0:2dd:ffff:ffff:ffff:ffff2^65
2620:0:2d0:2de::/642620:0:2d0:2de::2620:0:2d0:2de:ffff:ffff:ffff:ffff2^64
2620:0:2d0:2df::/1252620:0:2d0:2df::2620:0:2d0:2df::78
Other forms
Start (integer)
50676817340170353689313142918267011079
End (integer)
50676817340170357802937071355497021447
Start (expanded)
2620:0000:02d0:0200:0000:0000:0000:0007
End (expanded)
2620:0000:02d0:02df:0000:0000:0000:0007
Structured result (JSON) · 3.6 KB
{
  "items": [
    {
      "input": "2620:0:2d0:200::7-2620:0:2d0:2df::7",
      "ok": true,
      "kind": "range",
      "version": 6,
      "start": "2620:0:2d0:200::7",
      "end": "2620:0:2d0:2df::7",
      "count": "4113623928437230010369",
      "countExponent": null,
      "startInteger": "50676817340170353689313142918267011079",
      "endInteger": "50676817340170357802937071355497021447",
      "cidrs": [
        "2620:0:2d0:200::7/128",
        "2620:0:2d0:200::8/125",
        "2620:0:2d0:200::10/124",
        "2620:0:2d0:200::20/123",
        "2620:0:2d0:200::40/122",
        "2620:0:2d0:200::80/121",
        "2620:0:2d0:200::100/120",
        "2620:0:2d0:200::200/119",
        "2620:0:2d0:200::400/118",
        "2620:0:2d0:200::800/117",
        "2620:0:2d0:200::1000/116",
        "2620:0:2d0:200::2000/115",
        "2620:0:2d0:200::4000/114",
        "2620:0:2d0:200::8000/113",
        "2620:0:2d0:200::1:0/112",
        "2620:0:2d0:200::2:0/111",
        "2620:0:2d0:200::4:0/110",
        "2620:0:2d0:200::8:0/109",
        "2620:0:2d0:200::10:0/108",
        "2620:0:2d0:200::20:0/107",
        "2620:0:2d0:200::40:0/106",
        "2620:0:2d0:200::80:0/105",
        "2620:0:2d0:200::100:0/104",
        "2620:0:2d0:200::200:0/103",
        "2620:0:2d0:200::400:0/102",
        "2620:0:2d0:200::800:0/101",
        "2620:0:2d0:200::1000:0/100",
        "2620:0:2d0:200::2000:0/99",
        "2620:0:2d0:200::4000:0/98",
        "2620:0:2d0:200::8000:0/97",
        "2620:0:2d0:200:0:1::/96",
        "2620:0:2d0:200:0:2::/95",
        "2620:0:2d0:200:0:4::/94",
        "2620:0:2d0:200:0:8::/93",
        "2620:0:2d0:200:0:10::/92",
        "2620:0:2d0:200:0:20::/91",
        "2620:0:2d0:200:0:40::/90",
        "2620:0:2d0:200:0:80::/89",
        "2620:0:2d0:200:0:100::/88",
        "2620:0:2d0:200:0:200::/87",
        "2620:0:2d0:200:0:400::/86",
        "2620:0:2d0:200:0:800::/85",
        "2620:0:2d0:200:0:1000::/84",
        "2620:0:2d0:200:0:2000::/83",
        "2620:0:2d0:200:0:4000::/82",
        "2620:0:2d0:200:0:8000::/81",
        "2620:0:2d0:200:1::/80",
        "2620:0:2d0:200:2::/79",
        "2620:0:2d0:200:4::/78",
        "2620:0:2d0:200:8::/77",
        "2620:0:2d0:200:10::/76",
        "2620:0:2d0:200:20::/75",
        "2620:0:2d0:200:40::/74",
        "2620:0:2d0:200:80::/73",
        "2620:0:2d0:200:100::/72",
        "2620:0:2d0:200:200::/71",
        "2620:0:2d0:200:400::/70",
        "2620:0:2d0:200:800::/69",
        "2620:0:2d0:200:1000::/68",
        "2620:0:2d0:200:2000::/67",
        "2620:0:2d0:200:4000::/66",
        "2620:0:2d0:200:8000::/65",
        "2620:0:2d0:201::/64",
        "2620:0:2d0:202::/63",
        "2620:0:2d0:204::/62",
        "2620:0:2d0:208::/61",
        "2620:0:2d0:210::/60",
        "2620:0:2d0:220::/59",
        "2620:0:2d0:240::/58",
        "2620:0:2d0:280::/58",
        "2620:0:2d0:2c0::/60",
        "2620:0:2d0:2d0::/61",
        "2620:0:2d0:2d8::/62",
        "2620:0:2d0:2dc::/63",
        "2620:0:2d0:2de::/64",
        "2620:0:2d0:2df::/125"
      ],
      "warnings": [
        "This range needs 76 CIDR blocks. A single block (2620:0:2d0:200::/56) would also include 608742554432415203327 addresses outside your range; use the exact list for firewall rules."
      ],
      "startExpanded": "2620:0000:02d0:0200:0000:0000:0000:0007",
      "endExpanded": "2620:0000:02d0:02df:0000:0000:0000:0007",
      "covering": {
        "cidr": "2620:0:2d0:200::/56",
        "extraAddresses": "608742554432415203327"
      }
    }
  ],
  "totals": {
    "items": 1,
    "ok": 1,
    "failed": 0,
    "cidrBlocks": 76
  },
  "truncated": false
}

Why an IPv6 range becomes several prefixes

Registry exports, threat feeds and old configuration files sometimes give an IPv6 range as a start and an end address. Routing, firewalls and security groups work in prefixes instead. A prefix must be aligned to its own size, so an arbitrary range almost always needs several of them. This page returns the smallest exact set, so nothing outside your range is included.

For example, 2001:db8::1 to 2001:db8::8 becomes four prefixes:

PrefixCovers
2001:db8::1/1282001:db8::1
2001:db8::2/1272001:db8::2 to 2001:db8::3
2001:db8::4/1262001:db8::4 to 2001:db8::7
2001:db8::8/1282001:db8::8

How to use it

  1. Enter the rangeWrite start - end or start to end, one per line, up to 1,000 lines. A hyphen with no spaces works too, because IPv6 addresses never contain hyphens. Short, long or mixed notation is fine, as long as both ends are IPv6.
  2. Check the prefix listEach prefix is shown in short form. For a single range, you also see the first address, last address and size of every prefix.
  3. Weigh the covering prefixWhen a range needs several prefixes, the page also shows the smallest single prefix that holds it, and how many extra addresses that prefix would let in.

Reading the output

  • The worst case. An IPv6 range needs at most 254 prefixes. Ranges that come from real allocations usually need one or two.
  • Aligned ranges collapse. 2001:db8:: - 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff is exactly 2001:db8::/32.
  • Odd ends make a long list. 2620:0:2d0:200::7-2620:0:2d0:2df::7 needs 76 prefixes. Its covering prefix, 2620:0:2d0:200::/56, would let in 608,742,554,432,415,203,327 addresses you did not ask for. That is a clear sign to use the exact list.
  • Short-form output. Prefixes are written the RFC 5952 way. If you want every digit, run them through IPv6 expand.

Common problems

  • The start is after the end. Swap them. The page reports the order problem instead of guessing.
  • An IPv4 end address. Both ends must be IPv6. Convert IPv4 ranges with IP range to CIDR.
  • A prefix instead of a range. A line like 2001:db8::/32 is reported, with a pointer to IPv6 CIDR to range.
  • Brackets, ports and zone IDs. None of them belong in a range. The page rejects them with a message, so remove them and try again.
  • Rule limits. Some firewalls limit the entries per rule. Consider the covering prefix only if the extra addresses are acceptable.
  • Ranges typed by hand. If a range is not aligned, the result is a longer list. That is correct, not an error.

How it works

Both ends are read as 128-bit numbers. From the start address, the page repeatedly picks the largest aligned prefix that fits before the end, writes it down and moves past it. That finishes in at most 254 steps, using whole-number arithmetic only. The calculation runs on our server from the text you submit. It is not written to our logs, and it is kept in memory for at most a day. On the website, Google Analytics also records what you enter. See RFC 4291 (addressing) and RFC 5952 (text form). To go the other way, use IPv6 CIDR to range.

Questions people ask

How do I convert an IPv6 range to CIDR?

Give the start and end address, and take the list of prefixes that comes back. The list is the smallest set of prefixes whose union is exactly your range, with no overlap. For 2001:db8::1 to 2001:db8::8, that is four prefixes. If the range happens to line up with one prefix, you get just that one.

Why do I get several prefixes?

A prefix has to start at an address that divides evenly by its size. A range that does not start and end on those boundaries is split into aligned parts, and each part becomes a prefix. A hand-typed range often gives a longer list. Ranges taken from real allocations usually give only one or two.

Is the result the shortest possible?

Yes. The page works from the start address and always takes the largest aligned prefix that still fits before the end. That method gives the fewest prefixes that cover the range exactly, with no overlap. A covering prefix is shorter still, but only because it lets in extra addresses.

What should I do with a very large covering prefix?

Ignore it and use the exact list. A large extra-address count means the covering prefix would let in far more than you intended. Treat it as a shortcut for rough notes, or for cases where the extra addresses are harmless, and not as something to put into a firewall or access rule.

Does it accept ranges written with ::?

Yes. Compressed addresses with ::, fully written addresses and mixed notation are all fine. The prefixes in the result are shown in the canonical short form. If you want every digit written out, run them through the IPv6 expand tool.

Can I convert many ranges at once?

Yes. Put one range on each line, up to 1,000 lines. One request also stops after about 10,000 blocks in total, and lines past that point are reported as errors, so you can send them again in a separate batch. Good and bad lines can sit side by side, and each bad line gets its own message.

What is the difference between a range and a prefix?

A range has a start and an end address and can be any size. A prefix is a range that starts on a boundary and has a size that is a power of two, written as address/length, like 2001:db8::/32. Every prefix is a range, but most ranges are not a single prefix. This page turns the first kind into the second.

Use it from AI, the API or the command line

Every LookupOwl tool is also a free API and an MCP tool, with no key and no account. This one is ip_range_convert. Please be kind to the rate limits.

curl
curl "https://lookupowl.com/api/v1/tools/ip-range-convert?q=2620%3A0%3A2d0%3A200%3A%3A7-2620%3A0%3A2d0%3A2df%3A%3A7"
MCP
claude mcp add --transport http lookupowl https://lookupowl.com/mcp