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

# Cuid2 identifier (`cuid2`)

> **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.

Identifier of the Cuid2 library, the successor of cuid. It is a SHA-3 hash of a timestamp, a counter, a host fingerprint and random data, written in lowercase base36 after an initial random letter, so it reveals no creation time. The default length is 24 characters; applications can choose other lengths up to 32, which the regexp does not cover.

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

## Detection

Regular expression (Python `re`):

```
^[a-z][0-9a-z]{23}$
```

## Examples

- `tz4a98xxat96iws9zmbrgj3a` — Example of the Cuid2 README, default length
- `c94jt94rt4` (invalid example) — Cuid2 with a custom length of 10, not covered
- `1z4a98xxat96iws9zmbrgj3a` (invalid example) — Starts with a digit

## Translations

- ru: Идентификатор Cuid2

## Sources

- doc: <https://github.com/paralleldrive/cuid2>

## Quality

Score 73/100. Missing: second example, mapping (Wikidata, Schema.org, ...), detector coverage.

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