Skip to main content

IPv6 CIDR Calculator API

REAL DATA

Parse, split and compare IPv6 CIDRs with exact 128-bit arithmetic, RFC 5952 canonical output and correct /0 and /128 boundaries.

Authoritative reference data or standards computation

Base URL
/api/ipv6-cidr
Capabilities
4 routes
Last updated
July 29, 2026
Data source

GET /api/ipv6-cidr/parse

Live requestRuns against the public API
No key required
GET/api/ipv6-cidr/parse?cidr=2001%3Adb8%3Aabcd%3A%3A42%2F48

Request parameters

Strict IPv6 CIDR notation. The address may be any member of the block; the response and meta.params use the RFC 5952 canonical network address.

Advanced response options4 options

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/ipv6-cidr/parse?cidr=2001%3Adb8%3Aabcd%3A%3A42%2F48"
const res = await fetch("https://randomapi.dev/api/ipv6-cidr/parse?cidr=2001%3Adb8%3Aabcd%3A%3A42%2F48");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/ipv6-cidr/parse?cidr=2001%3Adb8%3Aabcd%3A%3A42%2F48").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/ipv6-cidr/parse?cidr=2001%3Adb8%3Aabcd%3A%3A42%2F48"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 1
cidr string required

Strict IPv6 CIDR notation. The address may be any member of the block; the response and meta.params use the RFC 5952 canonical network address.

allowed: 4 – 49
example: cidr=2001:db8:abcd::42/48
Universal parameters Shared response and formatting options 4
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=cidr,inputIp
exclude list

Return all fields except these (comma-separated).

example: exclude=expandedNetwork
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 8
cidr string

RFC 5952 canonical network and prefix.

example: 2001:db8:abcd::/48

inputIp string (IPv6)

Canonical address supplied before network alignment.

example: 2001:db8:abcd::42

network string (IPv6)

First address in the block.

example: 2001:db8:abcd::

lastAddress string (IPv6)

Last address in the inclusive block.

example: 2001:db8:abcd:ffff:ffff:ffff:ffff:ffff

prefix integer

CIDR prefix length from 0 through 128.

example: 48

hostBits integer

Number of address bits after the prefix.

example: 80

totalAddresses string (decimal integer)

Exact block size represented as a decimal string.

example: 1208925819614629174706176

expandedNetwork string (IPv6)

Network as eight lowercase four-digit hexadecimal groups.

example: 2001:0db8:abcd:0000:0000:0000:0000:0000

Documented examples

Build-generated requests and complete responses
3
Align a host address to a /48
GET /api/ipv6-cidr/parse?cidr=2001%3Adb8%3Aabcd%3A%3A42%2F48
{
  "data": {
    "cidr": "2001:db8:abcd::/48",
    "inputIp": "2001:db8:abcd::42",
    "network": "2001:db8:abcd::",
    "lastAddress": "2001:db8:abcd:ffff:ffff:ffff:ffff:ffff",
    "prefix": 48,
    "hostBits": 80,
    "totalAddresses": "1208925819614629174706176",
    "expandedNetwork": "2001:0db8:abcd:0000:0000:0000:0000:0000"
  },
  "meta": {
    "endpoint": "ipv6-cidr",
    "route": "/parse",
    "params": {
      "cidr": "2001:db8:abcd::/48"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Inspect the entire IPv6 address space
GET /api/ipv6-cidr/parse?cidr=ffff%3A%3A1%2F0
{
  "data": {
    "cidr": "::/0",
    "inputIp": "ffff::1",
    "network": "::",
    "lastAddress": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
    "prefix": 0,
    "hostBits": 128,
    "totalAddresses": "340282366920938463463374607431768211456",
    "expandedNetwork": "0000:0000:0000:0000:0000:0000:0000:0000"
  },
  "meta": {
    "endpoint": "ipv6-cidr",
    "route": "/parse",
    "params": {
      "cidr": "::/0"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Canonicalize an IPv4-mapped host route
GET /api/ipv6-cidr/parse?cidr=%3A%3Affff%3A192.0.2.1%2F128
{
  "data": {
    "cidr": "::ffff:192.0.2.1/128",
    "inputIp": "::ffff:192.0.2.1",
    "network": "::ffff:192.0.2.1",
    "lastAddress": "::ffff:192.0.2.1",
    "prefix": 128,
    "hostBits": 0,
    "totalAddresses": "1",
    "expandedNetwork": "0000:0000:0000:0000:0000:ffff:c000:0201"
  },
  "meta": {
    "endpoint": "ipv6-cidr",
    "route": "/parse",
    "params": {
      "cidr": "::ffff:192.0.2.1/128"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

GET /api/ipv6-cidr/contains

Live requestRuns against the public API
No key required
GET/api/ipv6-cidr/contains?cidr=2001%3Adb8%3Aabcd%3A%3A1%2F48&ip=2001%3Adb8%3Aabcd%3A%3Abeef

Request parameters

Strict IPv6 CIDR notation. The address may be any member of the block; the response and meta.params use the RFC 5952 canonical network address.

Strict IPv6 address to test against the block's inclusive boundaries.

Advanced response options4 options

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/ipv6-cidr/contains?cidr=2001%3Adb8%3Aabcd%3A%3A1%2F48&ip=2001%3Adb8%3Aabcd%3A%3Abeef"
const res = await fetch("https://randomapi.dev/api/ipv6-cidr/contains?cidr=2001%3Adb8%3Aabcd%3A%3A1%2F48&ip=2001%3Adb8%3Aabcd%3A%3Abeef");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/ipv6-cidr/contains?cidr=2001%3Adb8%3Aabcd%3A%3A1%2F48&ip=2001%3Adb8%3Aabcd%3A%3Abeef").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/ipv6-cidr/contains?cidr=2001%3Adb8%3Aabcd%3A%3A1%2F48&ip=2001%3Adb8%3Aabcd%3A%3Abeef"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 2
cidr string required

Strict IPv6 CIDR notation. The address may be any member of the block; the response and meta.params use the RFC 5952 canonical network address.

allowed: 4 – 49
example: cidr=2001:db8:abcd::42/48
ip string required

Strict IPv6 address to test against the block's inclusive boundaries.

allowed: 2 – 45
example: ip=2001:db8:abcd::beef
Universal parameters Shared response and formatting options 4
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=cidr,ip
exclude list

Return all fields except these (comma-separated).

example: exclude=lastAddress
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 5
cidr string

RFC 5952 canonical network and prefix.

example: 2001:db8:abcd::/48

ip string (IPv6)

Canonical address that was tested.

example: 2001:db8:abcd::beef

contains boolean

Whether ip lies inside the inclusive first-to-last address range.

example: true

network string (IPv6)

First address in the CIDR block.

example: 2001:db8:abcd::

lastAddress string (IPv6)

Last address in the CIDR block.

example: 2001:db8:abcd:ffff:ffff:ffff:ffff:ffff

Documented examples

Build-generated requests and complete responses
3
Address inside a documentation prefix
GET /api/ipv6-cidr/contains?cidr=2001%3Adb8%3Aabcd%3A%3A1%2F48&ip=2001%3Adb8%3Aabcd%3A%3Abeef
{
  "data": {
    "cidr": "2001:db8:abcd::/48",
    "ip": "2001:db8:abcd::beef",
    "contains": true,
    "network": "2001:db8:abcd::",
    "lastAddress": "2001:db8:abcd:ffff:ffff:ffff:ffff:ffff"
  },
  "meta": {
    "endpoint": "ipv6-cidr",
    "route": "/contains",
    "params": {
      "cidr": "2001:db8:abcd::/48",
      "ip": "2001:db8:abcd::beef"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Address outside the prefix
GET /api/ipv6-cidr/contains?cidr=2001%3Adb8%3A%3A%2F32&ip=2001%3Adb9%3A%3A1
{
  "data": {
    "cidr": "2001:db8::/32",
    "ip": "2001:db9::1",
    "contains": false,
    "network": "2001:db8::",
    "lastAddress": "2001:db8:ffff:ffff:ffff:ffff:ffff:ffff"
  },
  "meta": {
    "endpoint": "ipv6-cidr",
    "route": "/contains",
    "params": {
      "cidr": "2001:db8::/32",
      "ip": "2001:db9::1"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
The final address is included
GET /api/ipv6-cidr/contains?cidr=2001%3Adb8%3A%3A%2F126&ip=2001%3Adb8%3A%3A3
{
  "data": {
    "cidr": "2001:db8::/126",
    "ip": "2001:db8::3",
    "contains": true,
    "network": "2001:db8::",
    "lastAddress": "2001:db8::3"
  },
  "meta": {
    "endpoint": "ipv6-cidr",
    "route": "/contains",
    "params": {
      "cidr": "2001:db8::/126",
      "ip": "2001:db8::3"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

GET /api/ipv6-cidr/subnets

Live requestRuns against the public API
No key required
GET/api/ipv6-cidr/subnets?cidr=2001%3Adb8%3Aabcd%3A%3A42%2F48&newPrefix=52

Request parameters

Strict IPv6 CIDR notation. The address may be any member of the block; the response and meta.params use the RFC 5952 canonical network address.

Child prefix; must be at least the canonical parent's prefix and produce no more than 256 children.

Advanced response options4 options

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/ipv6-cidr/subnets?cidr=2001%3Adb8%3Aabcd%3A%3A42%2F48&newPrefix=52"
const res = await fetch("https://randomapi.dev/api/ipv6-cidr/subnets?cidr=2001%3Adb8%3Aabcd%3A%3A42%2F48&newPrefix=52");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/ipv6-cidr/subnets?cidr=2001%3Adb8%3Aabcd%3A%3A42%2F48&newPrefix=52").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/ipv6-cidr/subnets?cidr=2001%3Adb8%3Aabcd%3A%3A42%2F48&newPrefix=52"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 2
cidr string required

Strict IPv6 CIDR notation. The address may be any member of the block; the response and meta.params use the RFC 5952 canonical network address.

allowed: 4 – 49
example: cidr=2001:db8:abcd::42/48
newPrefix int required

Child prefix; must be at least the canonical parent's prefix and produce no more than 256 children.

allowed: 0 – 128
example: newPrefix=52
Universal parameters Shared response and formatting options 4
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=cidr,newPrefix
exclude list

Return all fields except these (comma-separated).

example: exclude=subnets
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 5
cidr string

Canonical parent network and prefix.

example: 2001:db8:abcd::/48

newPrefix integer

Requested aligned child prefix.

example: 52

subnetCount integer

Exact number of children: 2^(newPrefix - parent prefix), capped at 256.

example: 16

addressesPerSubnet string (decimal integer)

Exact address count in every child block.

example: 75557863725914323419136

subnets object[]

Complete ordered child list with canonical CIDR and inclusive boundaries; never truncated.

example: [{"cidr":"2001:db8:abcd::/52","network":"2001:db8:abcd::","lastAddress":"2001:db8:abcd:fff:ffff:ffff:ffff:ffff"}]

Documented examples

Build-generated requests and complete responses
3
Split a /48 into sixteen /52 blocks
GET /api/ipv6-cidr/subnets?cidr=2001%3Adb8%3Aabcd%3A%3A42%2F48&newPrefix=52
{
  "data": {
    "cidr": "2001:db8:abcd::/48",
    "newPrefix": 52,
    "subnetCount": 16,
    "addressesPerSubnet": "75557863725914323419136",
    "subnets": [
      {
        "cidr": "2001:db8:abcd::/52",
        "network": "2001:db8:abcd::",
        "lastAddress": "2001:db8:abcd:fff:ffff:ffff:ffff:ffff"
      },
      {
        "cidr": "2001:db8:abcd:1000::/52",
        "network": "2001:db8:abcd:1000::",
        "lastAddress": "2001:db8:abcd:1fff:ffff:ffff:ffff:ffff"
      },
      {
        "cidr": "2001:db8:abcd:2000::/52",
        "network": "2001:db8:abcd:2000::",
        "lastAddress": "2001:db8:abcd:2fff:ffff:ffff:ffff:ffff"
      },
      {
        "cidr": "2001:db8:abcd:3000::/52",
        "network": "2001:db8:abcd:3000::",
        "lastAddress": "2001:db8:abcd:3fff:ffff:ffff:ffff:ffff"
      },
      {
        "cidr": "2001:db8:abcd:4000::/52",
        "network": "2001:db8:abcd:4000::",
        "lastAddress": "2001:db8:abcd:4fff:ffff:ffff:ffff:ffff"
      },
      {
        "cidr": "2001:db8:abcd:5000::/52",
        "network": "2001:db8:abcd:5000::",
        "lastAddress": "2001:db8:abcd:5fff:ffff:ffff:ffff:ffff"
      },
      {
        "cidr": "2001:db8:abcd:6000::/52",
        "network": "2001:db8:abcd:6000::",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Enumerate 256 host routes
GET /api/ipv6-cidr/subnets?cidr=2001%3Adb8%3A%3A%2F120&newPrefix=128
{
  "data": {
    "cidr": "2001:db8::/120",
    "newPrefix": 128,
    "subnetCount": 256,
    "addressesPerSubnet": "1",
    "subnets": [
      {
        "cidr": "2001:db8::/128",
        "network": "2001:db8::",
        "lastAddress": "2001:db8::"
      },
      {
        "cidr": "2001:db8::1/128",
        "network": "2001:db8::1",
        "lastAddress": "2001:db8::1"
      },
      {
        "cidr": "2001:db8::2/128",
        "network": "2001:db8::2",
        "lastAddress": "2001:db8::2"
      },
      {
        "cidr": "2001:db8::3/128",
        "network": "2001:db8::3",
        "lastAddress": "2001:db8::3"
      },
      {
        "cidr": "2001:db8::4/128",
        "network": "2001:db8::4",
        "lastAddress": "2001:db8::4"
      },
      {
        "cidr": "2001:db8::5/128",
        "network": "2001:db8::5",
        "lastAddress": "2001:db8::5"
      },
      {
        "cidr": "2001:db8::6/128",
        "network": "2001:db8::6",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Keep a canonical block at its current prefix
GET /api/ipv6-cidr/subnets?cidr=fd00%3A1234%3A%3Abeef%2F64&newPrefix=64
{
  "data": {
    "cidr": "fd00:1234::/64",
    "newPrefix": 64,
    "subnetCount": 1,
    "addressesPerSubnet": "18446744073709551616",
    "subnets": [
      {
        "cidr": "fd00:1234::/64",
        "network": "fd00:1234::",
        "lastAddress": "fd00:1234::ffff:ffff:ffff:ffff"
      }
    ]
  },
  "meta": {
    "endpoint": "ipv6-cidr",
    "route": "/subnets",
    "params": {
      "cidr": "fd00:1234::/64",
      "newPrefix": 64
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

GET /api/ipv6-cidr/overlaps

Live requestRuns against the public API
No key required
GET/api/ipv6-cidr/overlaps?a=2001%3Adb8%3A%3A42%2F48&b=2001%3Adb8%3A0%3A1%3A%3Abeef%2F64

Request parameters

First strict IPv6 CIDR. Host bits are accepted and canonicalized to the network.

Second strict IPv6 CIDR. Host bits are accepted and canonicalized to the network.

Advanced response options4 options

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/ipv6-cidr/overlaps?a=2001%3Adb8%3A%3A42%2F48&b=2001%3Adb8%3A0%3A1%3A%3Abeef%2F64"
const res = await fetch("https://randomapi.dev/api/ipv6-cidr/overlaps?a=2001%3Adb8%3A%3A42%2F48&b=2001%3Adb8%3A0%3A1%3A%3Abeef%2F64");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/ipv6-cidr/overlaps?a=2001%3Adb8%3A%3A42%2F48&b=2001%3Adb8%3A0%3A1%3A%3Abeef%2F64").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/ipv6-cidr/overlaps?a=2001%3Adb8%3A%3A42%2F48&b=2001%3Adb8%3A0%3A1%3A%3Abeef%2F64"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 2
a string required

First strict IPv6 CIDR. Host bits are accepted and canonicalized to the network.

allowed: 4 – 49
example: a=2001:db8::1/48
b string required

Second strict IPv6 CIDR. Host bits are accepted and canonicalized to the network.

allowed: 4 – 49
example: b=2001:db8:0:1::beef/64
Universal parameters Shared response and formatting options 4
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=a,b
exclude list

Return all fields except these (comma-separated).

example: exclude=intersectionAddressCount
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 8
a string

Canonical first CIDR block.

example: 2001:db8::/48

b string

Canonical second CIDR block.

example: 2001:db8:0:1::/64

overlap boolean

Whether the inclusive address ranges intersect.

example: true

relation string

equal, aContainsB, bContainsA or disjoint.

example: aContainsB

intersectionCidr string nullable

Exact intersecting CIDR (the more specific block), or null when disjoint.

example: 2001:db8:0:1::/64

intersectionNetwork string (IPv6) nullable

First intersection address, or null when disjoint.

example: 2001:db8:0:1::

intersectionLastAddress string (IPv6) nullable

Last intersection address, or null when disjoint.

example: 2001:db8:0:1:ffff:ffff:ffff:ffff

intersectionAddressCount string (decimal integer) nullable

Exact intersection size as a decimal string, or null when disjoint.

example: 18446744073709551616

Documented examples

Build-generated requests and complete responses
3
A /48 contains a /64 after canonicalization
GET /api/ipv6-cidr/overlaps?a=2001%3Adb8%3A%3A42%2F48&b=2001%3Adb8%3A0%3A1%3A%3Abeef%2F64
{
  "data": {
    "a": "2001:db8::/48",
    "b": "2001:db8:0:1::/64",
    "overlap": true,
    "relation": "aContainsB",
    "intersectionCidr": "2001:db8:0:1::/64",
    "intersectionNetwork": "2001:db8:0:1::",
    "intersectionLastAddress": "2001:db8:0:1:ffff:ffff:ffff:ffff",
    "intersectionAddressCount": "18446744073709551616"
  },
  "meta": {
    "endpoint": "ipv6-cidr",
    "route": "/overlaps",
    "params": {
      "a": "2001:db8::/48",
      "b": "2001:db8:0:1::/64"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Two adjacent /64 blocks are disjoint
GET /api/ipv6-cidr/overlaps?a=2001%3Adb8%3A1%3A%3A%2F64&b=2001%3Adb8%3A2%3A%3A%2F64
{
  "data": {
    "a": "2001:db8:1::/64",
    "b": "2001:db8:2::/64",
    "overlap": false,
    "relation": "disjoint",
    "intersectionCidr": null,
    "intersectionNetwork": null,
    "intersectionLastAddress": null,
    "intersectionAddressCount": null
  },
  "meta": {
    "endpoint": "ipv6-cidr",
    "route": "/overlaps",
    "params": {
      "a": "2001:db8:1::/64",
      "b": "2001:db8:2::/64"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
The full IPv6 space contains a documentation prefix
GET /api/ipv6-cidr/overlaps?a=ffff%3A%3A1%2F0&b=2001%3Adb8%3A%3A1%2F32
{
  "data": {
    "a": "::/0",
    "b": "2001:db8::/32",
    "overlap": true,
    "relation": "aContainsB",
    "intersectionCidr": "2001:db8::/32",
    "intersectionNetwork": "2001:db8::",
    "intersectionLastAddress": "2001:db8:ffff:ffff:ffff:ffff:ffff:ffff",
    "intersectionAddressCount": "79228162514264337593543950336"
  },
  "meta": {
    "endpoint": "ipv6-cidr",
    "route": "/overlaps",
    "params": {
      "a": "::/0",
      "b": "2001:db8::/32"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

About this API

Coverage & behavior

Calculates exact IPv6 CIDR boundaries without converting 128-bit addresses to unsafe JavaScript numbers. Any address inside a block is accepted and aligned to its network; for example, 2001:0DB8:abcd::42/48 becomes 2001:db8:abcd::/48.

Output follows RFC 5952: lowercase hexadecimal, no leading zeroes, the first longest run of two or more zero groups compressed, and dotted-decimal output for IPv4-mapped IPv6 addresses. The expanded network is also returned as eight four-digit groups when fixed-width display is useful.

Validation is intentionally strict. There must be exactly one legal IPv6 address and a decimal prefix from 0 through 128. Zone identifiers, brackets, multiple :: sequences, leading-zero prefixes and trailing characters are rejected rather than guessed. Address counts are decimal strings because most IPv6 blocks exceed JSON's safe integer range.

/subnets returns every aligned child at newPrefix and rejects splits larger than 256 children rather than truncating a mathematically complete result. /overlaps canonicalizes two blocks and reports equality, containment or disjointness. Aligned CIDR blocks cannot partially overlap, so an intersection is always exactly the more-specific block.

Use it for

  • Canonicalize IPv6 allow-list entries before saving configuration
  • Calculate exact first and last addresses for an IPv6 allocation
  • Check whether an IPv6 client belongs to a routed or reserved prefix
  • Split allocations into complete child-prefix plans and compare route tables

Frequently asked questions

Does the API return RFC 5952 canonical IPv6 addresses?

Yes. Hexadecimal is lowercase, leading zeroes are removed and only the first longest run of at least two zero groups is compressed.

Can the calculator handle IPv6 /0 and /128 blocks exactly?

Yes. Boundaries and counts use 128-bit BigInt arithmetic; counts are returned as decimal strings so no precision is lost in JSON.

Are IPv4-embedded IPv6 addresses supported?

Yes. A dotted-decimal IPv4 tail is parsed in the final 32 bits, and IPv4-mapped addresses are canonicalized in mixed notation such as ::ffff:192.0.2.1.

Can I split or compare IPv6 CIDR blocks?

Yes. /subnets returns a complete ordered child list up to 256 blocks, while /overlaps classifies equality, containment or disjointness with an exact intersection.

Standards & references