---
title: "Expand and compress IPv6 addresses (RFC 5952), classify them (link-local, ULA, multicast, documentation…), extract embedded IPv4, do prefix and range maths, and build ip6.arpa names."
method: POST
path: "/api/v1/ipv6"
tags: ["Converters"]
---

# Expand and compress IPv6 addresses (RFC 5952), classify them (link-local, ULA, multicast, documentation…), extract embedded IPv4, do prefix and range maths, and build ip6.arpa names.

`POST /api/v1/ipv6`

## Request

- Base URL: `https://programmes.net`
- URL: `https://programmes.net/api/v1/ipv6`
- Auth: none declared

IPv6 Address Tool. Operations: `analyze` — Analyse an address, prefix or range: canonical and expanded forms, type, embedded IPv4, network bounds, reverse DNS. `compress` — Rewrite each address in its RFC 5952 canonical (shortest) form. `expand` — Rewrite each address with all eight 4-digit groups.

## Request body

- union
  - Ipv6Analyze: Analyse an address, prefix or range: canonical and expanded forms, type, embedded IPv4, network bounds, reverse DNS.
    - `operation` 'analyze', required
    - `input` string: An IPv6 address (2001:db8::1, fe80::1%eth0, [::1]:443), prefix (2001:db8::/32) or range (2001:db8:: - 2001:db8::ff).
    - `options` object
  - Ipv6Compress: Rewrite each address in its RFC 5952 canonical (shortest) form.
    - `operation` 'compress', required
    - `input` string: One or more IPv6 addresses, one per line.
    - `options` object
  - Ipv6Expand: Rewrite each address with all eight 4-digit groups.
    - `operation` 'expand', required
    - `input` string: One or more IPv6 addresses, one per line.
    - `options` object

## Response `200`

The operation ran.

- object
  - `ok` unknown, required
  - `tool` 'ipv6', required
  - `operation` 'analyze' | 'compress' | 'expand', required
  - `result` unknown, required

## Other responses

- `400`: The request is not valid (https://programmes.net/api#invalid-request); The tool has no such operation (https://programmes.net/api#unknown-operation)
- `404`: No such tool (https://programmes.net/api#unknown-tool)
- `413`: The request or its input is too large (https://programmes.net/api#content-too-large)
- `415`: The body must be JSON (https://programmes.net/api#unsupported-media-type)
- `422`: An option is missing, of the wrong type or out of range (https://programmes.net/api#invalid-options); This call needs more CPU than one API call may use (https://programmes.net/api#refused); The operation could not process the input (https://programmes.net/api#tool-error)
- `429`: Too many requests (https://programmes.net/api#rate-limited)
- `500`: Internal error (https://programmes.net/api#internal-error)

---

[API](https://skmtc.dev/programmes/apis/programmes-net-api.md) · [All operations](https://skmtc.dev/programmes/apis/programmes-net-api/llms.txt) · [OpenAPI document](https://skmtc.dev/programmes/apis/programmes-net-api/revisions/aa939784a2e6?raw)
