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

# CUID (collision-resistant unique identifier) (`cuid`)

> **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 cuid library, written as the letter c followed by 24 lowercase base36 characters that encode a timestamp, a counter, a host fingerprint and random data. Prisma generates it with @default(cuid()). Its authors deprecated it for security reasons, since parts of it can be guessed, and recommend Cuid2 (cuid2) instead. The 25-character length holds while the base36 timestamp has 8 digits, which lasts until 2059.

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

## Detection

Regular expression (Python `re`):

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

## Examples

- `cjld2cjxh0000qzrmn831i7rn` — Example of the cuid README
- `cjld2cyuq0000t3rmniod1foy` — Example of the cuid README
- `tz4a98xxat96iws9zmbrgj3a` (invalid example) — Cuid2 of the default length, see cuid2
- `Cjld2cjxh0000qzrmn831i7rn` (invalid example) — Uppercase letter

## Translations

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

## Sources

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

## Quality

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

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