---
id: "ipv6"
kind: "datatype"
status: "stable"
is_pii: true
categories: ["internet", "pii"]
langs: ["common"]
quality: 100
url: "http://registry.apicrafter.io/datatype/ipv6"
---

# IPv6 address (`ipv6`)

128-bit address of Internet Protocol version 6, written as eight groups of up to four hexadecimal digits separated by colons (RFC 4291, section 2.2). One run of zero groups may be shortened to ::, and the last 32 bits may be written as an IPv4 address, as in ::ffff:192.0.2.128. RFC 5952 recommends lowercase and the shortest form, but data also holds full and uppercase forms, and the regexp accepts all of them. It does not accept a zone index (fe80::1%eth0) or a prefix length. 2001:db8::/32 is reserved for documentation (RFC 3849).

- Parent datatype: `ipaddr`
- Personal data (PII): yes
- Categories: Internet (internet), Personally identifiable information (pii)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:(?:[0-9A-Fa-f]{1,4}:){6}(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|::(?:[0-9A-Fa-f]{1,4}:){5}(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3})|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)$
```

## Examples

- `2001:db8::1` — Shortest form, documentation prefix (RFC 3849)
- `2001:0db8:0000:0000:0000:ff00:0042:8329` — Full form with leading zeros
- `::ffff:192.0.2.128` — IPv4-mapped address
- `::1` — Loopback address
- `2001:db8::1::2` (invalid example) — :: used twice
- `2001:db8:0:0:0:0:0:0:1` (invalid example) — Nine groups
- `2001:db8::/32` (invalid example) — A prefix, not an address

## Mappings

- autotype: `ipv6`
- cdm: `means.identity.IP6Address`
- dpv: `pd:IPAddress`
- fta: `IPADDRESS.IPV6`
- purview: `IP Address v6`

## Metacrafter rules

1 rules: 0 match the field name, 1 match values.

- `ipv6` (data, `ext/ext_internet.yaml`)

## Supported by tools

- `autotype`
- `datahub`
- `dataiku`
- `dataprep`
- `dataprofiler`
- `fta`
- `greatexpectations`
- `ibmknowledgecatalog`
- `metacrafter`
- `metacrafterpro`
- `metadata-guardian`
- `microsoftpurview`
- `soda`
- `sqldatacatalog`
- `talend`

## Translations

- ru: IPv6-адрес: 128-битный адрес протокола IPv6: восемь групп шестнадцатеричных цифр через двоеточие, допускается сокращение ::.

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/IPv6_address>
- doc: <https://www.rfc-editor.org/rfc/rfc4291#section-2.2>
- doc: <https://www.rfc-editor.org/rfc/rfc5952>

## Quality

Score 100/100.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/ipv6.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/internet/ipv6.yaml>
