---
id: "uuid_v7"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["identifiers"]
langs: ["common"]
quality: 80
url: "http://registry.apicrafter.io/datatype/uuid_v7"
---

# Unix time-ordered UUID (version 7) (`uuid_v7`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

UUID of version 7, introduced by RFC 9562 in 2024. The first 48 bits are the Unix time in milliseconds, and the rest, apart from the version and variant bits, is random or a counter. Values sort by creation time, which suits database keys, and RFC 9562 recommends this version over versions 1 and 6. The creation time can be read back from the first 12 hexadecimal digits. The version digit, the first digit of the third group, is 7. PostgreSQL 18 makes it with uuidv7() and Python 3.14 with uuid.uuid7().

- Parent datatype: `uuid`
- Personal data (PII): no
- Categories: Universal unique identifiers (identifiers)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-7[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$
```

## Examples

- `017F22E2-79B0-7CC3-98C4-DC0C0C07398F` — UUIDv7 test vector of RFC 9562 (Appendix A.6), created 2022-02-22 19:22:22 UTC
- `01890a5d-ac96-774b-bcce-b302099a8057` — UUIDv7 of the valid-uuidv7 test case of the TypeID specification
- `919108f7-52d1-4320-9bac-f847db4148a8` (invalid example) — UUIDv4
- `1EC9414C-232A-6B00-B3C8-9F6BDECED846` (invalid example) — UUIDv6

## Translations

- ru: UUID версии 7 (упорядоченный по времени Unix)

## Sources

- doc: <https://www.rfc-editor.org/rfc/rfc9562#name-uuid-version-7>

## Quality

Score 80/100. Missing: mapping (Wikidata, Schema.org, ...), detector coverage.

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