Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

IPv6 Expand and Compress API

Validate an IPv6 address and return its expanded and compressed forms, address type, reverse DNS name, embedded IPv4, integer value and, with a prefix, the network range.

POST /api/v1/tools/ipv6-address-toolMCP ipv6_address_toolNetwork Tools

Expand or compress IPv6 addresses to RFC 5952 form, validate them, find the address type and prefix range, and get the ip6.arpa reverse DNS name.

Input

Send these as a JSON object. Unknown fields are rejected.

address
An IPv6 address, optionally with a /prefix or %zone, e.g. 2001:db8::1/64. (string, up to 200 characters, required)
curl https://pithlab.com/api/v1/tools/ipv6-address-tool \n  -H "Authorization: Bearer $PITHLAB_KEY" \n  -H "Content-Type: application/json" \n  -d '{"address":"2001:db8:0:0:8:800:200c:417a/64"}'
Example response
{
  "ok": true,
  "result": {
    "input": "2001:db8:0:0:8:800:200c:417a/64",
    "expanded": "2001:0db8:0000:0000:0008:0800:200c:417a",
    "compressed": "2001:db8::8:800:200c:417a",
    "canonical": "2001:db8::8:800:200c:417a/64",
    "zone": null,
    "prefix": 64,
    "type": {
      "type": "Documentation (RFC 3849)",
      "range": "2001:db8::/32"
    },
    "reverseDns": "a.7.1.4.c.0.0.2.0.0.8.0.8.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa",
    "ipv4": null,
    "integer": "42540766411282592856906245548098208122",
    "network": {
      "cidr": "2001:db8::/64",
      "first": "2001:db8::",
      "last": "2001:db8::ffff:ffff:ffff:ffff",
      "firstExpanded": "2001:0db8:0000:0000:0000:0000:0000:0000",
      "lastExpanded": "2001:0db8:0000:0000:ffff:ffff:ffff:ffff",
      "size": "18,446,744,073,709,551,616"
    }
  }
}