API reference@evolu/commonType › Id

type Id = string & Brand<"Id">;

Defined in: packages/common/src/Type.ts:5892

Evolu Id: 16 bytes encoded as a 22-character Base64Url.

Like Nano ID, it is compact and URL-safe. Unlike Nano ID's 21-character default, an Evolu Id is the canonical Base64Url encoding of a full 128-bit value, so it round-trips directly between its string and byte representations with idToIdBytes and idBytesToId. These helpers use native Base64 APIs.

createId is the privacy-preserving default. Use createIdFromString for stable mappings from external identifiers, or createIdAsUuidv7 only when insertion locality is worth exposing the creation time encoded in the identifier.