---
id: "uuid"
kind: "datatype"
status: "stable"
is_pii: false
name: "Universally unique identifier (UUID)"
regexp: "^(?:[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}|\\{[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\})$"
categories: ["identifiers"]
langs: ["common"]
aliases: ["guid"]
quality: 100
url: "https://registry.apicrafter.io/datatype/uuid"
---

# Universally unique identifier (UUID) (`uuid`)

128-bit identifier that systems generate without a central registry, defined by RFC 9562 (2024), which replaced RFC 4122. Microsoft calls it a GUID. The text form is 32 hexadecimal digits in five groups of 8, 4, 4, 4 and 12 separated by hyphens, in any letter case. The first digit of the third group is the version (1 to 8, see uuid_v1, uuid_v4 and uuid_v7), and the first digit of the fourth group is 8, 9, a or b for the RFC 9562 variant. The Nil UUID (all zeros) and the Max UUID (all f) are special values. Microsoft tools and the Windows registry write GUIDs in curly braces, a form the regexp also accepts. The regexp does not accept the 32 digits without hyphens, which look like an MD5 hash, or the urn:uuid form (uuid_urn).

- Personal data (PII): no
- Categories: Universal unique identifiers (identifiers)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier
- Former IDs: `guid`
- Patterns: [`uuid_urn`](https://registry.apicrafter.io/datatype/uuid_urn.md)

## Detection

Regular expression (Python `re`):

```
^(?:[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}|\{[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\})$
```

## Examples

- `f81d4fae-7dec-11d0-a765-00a0c91e6bf6` — Example string UUID of RFC 9562 (Figure 1)
- `919108f7-52d1-4320-9bac-f847db4148a8` — UUIDv4 test vector of RFC 9562 (Appendix A.3)
- `6fa459ea-ee8a-3ca4-894e-db77e160355e` — Name-based UUIDv3 from the Python uuid module documentation
- `{C232AB00-9414-11EC-B3C8-9F6BDECED846}` — UUIDv1 test vector of RFC 9562 in the braced GUID form of Microsoft tools
- `f81d4fae7dec11d0a76500a0c91e6bf6` (invalid example) — 32 hexadecimal digits without hyphens
- `urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6` (invalid example) — URN form, see uuid_urn
- `{f81d4fae-7dec-11d0-a765-00a0c91e6bf6` (invalid example) — Unbalanced brace

## Mappings

- autotype: `guid`
- cdm: `is.dataFormat.guid`
- fta: `GUID`
- misp: `uuid`
- presidio: `UUID`

## Metacrafter rules

4 rules: 2 match the field name, 2 match values.

- `guid` (data, `basic/identifiers.yaml`)
- `guidbyname` (field, `basic/identifiers.yaml`)
- `uuidbyname` (field, `basic/identifiers.yaml`)
- `uuidbyvalue` (data, `basic/identifiers.yaml`)

## Supported by tools

- [`autotype`](https://registry.apicrafter.io/tool/autotype.md)
- [`collibra`](https://registry.apicrafter.io/tool/collibra.md)
- [`csvdetective`](https://registry.apicrafter.io/tool/csvdetective.md)
- [`dataprofiler`](https://registry.apicrafter.io/tool/dataprofiler.md)
- [`frictionless`](https://registry.apicrafter.io/tool/frictionless.md)
- [`fta`](https://registry.apicrafter.io/tool/fta.md)
- [`greatexpectations`](https://registry.apicrafter.io/tool/greatexpectations.md)
- [`grok`](https://registry.apicrafter.io/tool/grok.md)
- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)
- [`presidio`](https://registry.apicrafter.io/tool/presidio.md)
- [`pydantic`](https://registry.apicrafter.io/tool/pydantic.md)
- [`pywhat`](https://registry.apicrafter.io/tool/pywhat.md)
- [`recognizerstext`](https://registry.apicrafter.io/tool/recognizerstext.md)
- [`sapcds`](https://registry.apicrafter.io/tool/sapcds.md)
- [`soda`](https://registry.apicrafter.io/tool/soda.md)
- [`validatorjs`](https://registry.apicrafter.io/tool/validatorjs.md)
- [`visions`](https://registry.apicrafter.io/tool/visions.md)

## Translations

- ru: Универсальный уникальный идентификатор (UUID): 128-битный идентификатор по RFC 9562, который системы создают без центрального реестра. В Microsoft его называют GUID. Записывается как 32 шестнадцатеричные цифры в пяти группах (8-4-4-4-12) через дефис; первая цифра третьей группы указывает версию.

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Universally_unique_identifier>
- wikidata: <https://www.wikidata.org/wiki/Q195284>
- doc: <https://www.rfc-editor.org/rfc/rfc9562>

## Quality

Score 100/100.

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