← Glossary

What Is a Unique Identifier?

A unique identifier is a value that distinguishes one entity from every other within a defined scope, such as a database, a device or a global namespace. Uniqueness is always relative to that scope and lifetime, and an identifier is not the same thing as an identity.

Updated:

A unique identifier is a value assigned to an entity so that, within some defined space, no other entity carries the same value. The entity can be a database row, a user account, an app installation, a network interface, a browser session or a physical device; the identifier can be a counter, a random string, a hash or a structured code. Uniqueness is assessed within a namespace: the system intends the value to refer unambiguously to one entity. Some schemes enforce this with constraints; others make collisions sufficiently unlikely for their intended use.

Scope matters. A customer number is unique within one company's records and meaningless outside them. UUIDs aim for practical uniqueness across independently operating systems, without promising mathematical impossibility of a collision. A browser fingerprint is often unique within a population but is never guaranteed to be. Always ask where uniqueness applies and how long the identifier lasts.

Identifier Generation and Assignment

There are three broad ways to produce a unique ID, and each trades off coordination, predictability and size.

Sequential assignment uses a central authority, typically a database, that hands out the next number in a series. A correctly managed sequence with suitable constraints avoids duplicates within its namespace. Values may reveal ordering or approximate volume, while merging independently numbered datasets requires remapping or a wider namespace. Distributed sequence schemes can allocate ranges rather than contact one counter for every value.

Random generation draws a value from a space so large that two independent draws are astronomically unlikely to match. A common format is the UUID: 128 bits, usually represented by 32 hexadecimal digits and four hyphens. A version 4 UUID contains 122 random bits; a version 7 UUID puts a millisecond timestamp in its leading bits to support approximate chronological ordering, which helps database indexes. UUIDs allow independent generators to create values without central registration. Browsers expose a method for generating version 4 UUIDs from a cryptographically strong random source.

Derived identifiers are computed from other data. A content hash derives an identifier from bytes: identical input produces the same value, while different input should be overwhelmingly likely to produce a different value with a suitable cryptographic hash. Name-based UUID versions hash a namespace and a name so that the same input always yields the same identifier. Assigned hardware identifiers are another category. Manufacturer-issued serials or IMEIs describe hardware under their assignment rules. A network interface may have a factory MAC address, but software can also use a locally administered or randomised address.

Scope, Lifetime and Collision Risk

Identifier scope describes who can see and use the value. On a mobile platform, for example, an identifier may be visible only to the app that created it, shared across a group of apps from one developer, or available to every app on the device. The wider the scope, the more useful the identifier is for linking activity across contexts, and therefore the greater its tracking potential. Platform guidance consequently steers developers toward the narrowest scope that serves the use case and away from device-wide hardware identifiers.

Lifetime describes when the value changes. Some identifiers exist for a single session and vanish when the app or browser closes. Some reset when an app is reinstalled, others when a device is factory-reset, and some, such as hardware serial numbers, survive even that. Resetting an identifier removes that particular continuity signal; it does not erase server records or prevent linkage through accounts and other data. Advertising identifiers on major mobile platforms are built on this principle, and platform rules restrict reconnecting reset identifiers, with exact conditions varying by platform and purpose.

Identifier collision, two distinct entities receiving the same value, is the failure mode of uniqueness. For sequential IDs it can result from overlapping sequences, exhausted ranges or implementation errors. For random IDs it is a matter of probability: with 122 random bits the chance that any two of billions of UUIDs coincide is negligible for ordinary purposes, but it is not zero, and the acceptable risk depends on consequences. Even a logging collision can confuse an investigation; a duplicate payment reference can affect financial processing. The relevant standard advises weighing collision risk against the application rather than assuming it away, and notes that the risk rises as more independent generators participate.

Guessability is a separate property from uniqueness. A sequential ID is unique but trivially predictable, and even random UUIDs should not be assumed hard to guess in a security sense. A public record ID should not become an access credential merely because it looks random. Purpose-built bearer tokens can authorise access, but require secure generation, confidentiality, appropriate scope and lifecycle controls beyond ordinary ID uniqueness.

Identifiers vs Identities and Fingerprints

An identifier is a label; an identity is the entity being labelled and the facts known about it. A user ID distinguishes an account record but does not verify the human behind it. The same person can hold many identifiers, one per service, and one identifier can be shared by several people if they share an account or a device. Account recognition is not identity proofing.

KindExampleHow uniqueness is achievedTypical scopeCan it change?
Database keyOrder number 10482Central counterOne systemRarely; keys are stable by design
Random identifierVersion 4 UUIDLarge random spaceGlobal, no registryReplacement depends on the application
Hardware identifierIMEI, MAC addressVendor assignmentDevice-wideDepends on type; observed MAC addresses may be randomised
Resettable platform IDMobile advertising IDRandom, platform-managedDevice, policy-limitedYes, by the user
Probabilistic fingerprintBrowser fingerprint hashCombination of observed attributesObserver's datasetDrifts with software or settings changes

A fingerprint belongs in a different category from the others. It is not assigned at all; it is inferred by an observer from characteristics the device happens to expose, and different devices can produce the same observed signature. It is better described as a probabilistic recogniser than as a unique identifier, and a system that treats a fingerprint match as proof that the same device returned will sometimes be wrong in both directions.

Where Unique Identifiers Appear

Nearly every layer of a networked system relies on them. Primary keys tie records together inside databases. Session identifiers can connect HTTP requests to a session, whether authenticated or anonymous. Installation IDs let an app recognise itself to its backend across launches. Trace and request IDs follow a single operation through many microservices so that logs can be correlated. Content hashes deduplicate files and verify downloads. Identifiers in URLs, such as a product or user path segment, make resources addressable.

The same ubiquity creates the privacy questions. An identifier that is stable over time and visible to many parties becomes a hook for linking behaviour, which is why data protection law in several jurisdictions treats online identifiers, including cookie values and IP addresses, as personal data when they can single out an individual. The design choices discussed above, narrow scope, short lifetime, user resettability and no reuse as a credential, are the practical response: they keep identifiers useful for the systems that need them while limiting what anyone else can build on top.

Frequently asked questions

Is an identifier always personal data?

Not inherently, but it often is in practice. Data protection rules in several jurisdictions treat an identifier as personal data when it can single out an individual, which includes cookie values and IP addresses even when no name is attached.

Can a unique ID change?

Yes, if the scheme allows it. Sessions can rotate IDs, applications can regenerate installation IDs, and platforms may offer resettable advertising IDs. Database keys are often kept stable for references. Changing a value does not automatically delete records or prevent linkage through other data.

Does a UUID identify a physical device?

No. A UUID is a 128-bit identifier format with several generation methods, including random, time-based and name-based variants. It refers to whatever the application assigns it to, such as a record or installation. The format alone does not prove a physical device or person.

What is the difference between a unique identifier and a fingerprint?

An assigned ID is intended to distinguish an entity within a namespace; its uniqueness may be enforced or probabilistic. A fingerprint is derived from observations and can match different devices or change on one device. Neither alone proves the identity of a person.

Can a unique identifier be used as a password or access token?

Do not assume an ordinary record ID is a secure credential. Purpose-built access tokens need secure randomness, limited scope, protection from disclosure and appropriate expiry or revocation. A value being unique, or having UUID syntax, does not establish those security properties.