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

# IP address (IPv4 or IPv6) (`ipaddr`)

Address of a network interface in the Internet Protocol: a 32-bit IPv4 address in dotted-decimal form (192.0.2.1) or a 128-bit IPv6 address in hexadecimal groups (2001:db8::1). Use this record for columns that mix both versions; ipv4 and ipv6 describe each form. The IP address of a user's device or connection can single out a person, so data protection laws such as the GDPR may treat it as personal data.

- 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`):

```
^(?:(?: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}:){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

- `192.0.2.1` — IPv4 address from the documentation range (RFC 5737)
- `2001:db8::1` — IPv6 address from the documentation prefix (RFC 3849)
- `192.0.2.0/24` (invalid example) — A network prefix, not an address
- `192.0.2.256` (invalid example) — The last part is larger than 255

## Mappings

- dpv: `pd:IPAddress`
- google_dlp: `IP_ADDRESS`
- presidio: `IP_ADDRESS`
- purview: `IP address`

## Metacrafter rules

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

- `ipvaddr` (field, `common/internet.yaml`)

## Supported by tools

- `awsglue`
- `azureailanguage`
- `collibra`
- `databricks`
- `dataiku`
- `dataprep`
- `googledlp`
- `ibmguardium`
- `metacrafter`
- `metacrafterpro`
- `metadata-guardian`
- `microsoftpurview`
- `nightfall`
- `openmetadata`
- `oracledatasafe`
- `presidio`
- `snowflake`
- `soda`
- `sqldatacatalog`
- `woodwork`

## Translations

- ru: IP-адрес (IPv4 или IPv6): Адрес сетевого интерфейса в протоколе IP версии 4 или 6.

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/IP_address>

## Quality

Score 100/100.

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